What would happen if a rogue planet hit one of the planets in our Solar System?
It would depend entirely on the size, composition and trajectory of the two objects coming into the collision. They could annihilate each other leaving a mess of debris. Or one or both could survive the collisions in some form. And each of the surviving objects could be flung out of the solar system, flung into a spiral into the sun, flung into an elliptical orbit, or thrown into other objects. The space between planets is big so odds of direct and immediate collision of the "planets like billiard balls" variety you see on some sci-fi aren't likely. But anything the size of a planet would be seen well before any impact.