It only makes sense to think that they "move" when you can see them relative to something else. If there is nothing else nearby, or if you can't see anything, it makes just as much sense to think that they are not moving.
The first law of motion, as described by Isaac Newton, says that something EITHER stays still OR carries on moving in a straight line, UNLESS it is acted on by an external force. If there is nothing to push or propel an asteroid (or whatever) in space, it will carry on moving through space minding its own business, and it doesn't need a force to push it.
If you push a stone across the floor, it will skid a bit and then stop. It only slows down because there is a force acting on it to make it stop (i.e. the friction from the rough surface of the floor). If you push a wet ice cube across a smooth polished floor, it will slide much further because there is less friction. A rock out in space is like an ice-cube with no floor. It just goes on and on because there is no friction to stop it.
In practice, most of the asteroids and comets we see go in long curved paths because they are gradually being pulled by the gravity from the sun and the planets. Gravity is a force which pulls them off in a different direction and stops them from going in a straight line.