The solar system is crowded with small objects like asteroids and comets. Most have stable orbits which keep them out of harm’s way, but a small proportion of them are in orbits that risk them colliding with planets.