The atmosphere doesn’t just “end” at a certain height. It just gets thinner and thinner.
In low Earth orbit, where the ISS is orbiting, there is still some atmosphere. It’s very, very thin, but it’s there. At the top of Mount Everest, just 5 and a half miles above sea level, you need oxygen to survive a long duration. At the International Space Station, 250 miles above sea level, you need a space suit.
Atmosphere, however, is still there – but very thin. Over time the ISS needs a boost to stay in orbit because it slows down due to atmospheric drag.
Most objects orbiting the Earth will succumb to falling eventually, but the higher they are, the longer they’ll stay. Some, way out in geostationary orbit 26,199 miles high, atmosphere is virtually non-existent, so those satellites will probably stay up there a few million or billion years.