The Laws of physics determines their path, and the forces of gravity are the main force there. As for smashing into each other, I guess It's possible, especially in a system where objects are continually crashing into each other. If you mean our solar system, It's probably all ready happened...