If there's no gravity, they don't orbit. If they orbit with gravity but with no atmosphere, they stay orbiting indefinitely.
Not quite true. For example quite a few orbits around the moon are unstable and you will end up crashing into the surface. This is due to essentially all celestial objects not being spherical.