Our eyes adjust shape depending on the levels of brightness. When it’s dark your pupil gets bigger to let more light in just light a camera lens.
Because your pupil is bigger you’re able to see things that are fainter. (You can experience this by going outside at night from a bright house and noticing how everything becomes steadily easier to see).
When you’re in a city there is lots of light about from street lights such so your pupils don’t need to open as wide. Because they don’t do this you’re not able see the fainter stars.
In effect the ambient light in a city ‘drowns out’ the light of the night sky.
Just to add to what James and Bradley have said: light from human activities (things like streetlights and car headlights) can also reflect off of the atmosphere, which is what gives the sky the red/orange glow that you can see in big cities.
If you go out to the countryside, the sky is a much darker colour, because it doesn’t have this man-made light reflecting off it. This makes the light from stars stand out much more clearly. It’s kind of like how no-one would notice if you got white paint on a white t-shirt, but if you got white paint on a black t-shirt it would be pretty obvious! Hope this helps.