What would happen if two planets collided?
Well, let's start off with something a bit smaller. When the impact which we think wiped out the dinosaurs hit; a 10-15km asteroid was thought to have hit somewhere in Mexico in Chicxulub. Just the 10-15km asteroid hitting the Earth released about the same energy as 100,000,000,000,000 tonnes of dynamite exploding (or TNT). Just to compare to that, the biggest nuclear bomb we’ve ever built was the equivalent of 50,000,000 tonnes of TNT.
If you scale that up to something the size of a planet so several thousand kilometres across the amount of energy released is going to be absolutely immense. We think that Earth was originally hit, or what we call proto-Earth - Thea, was hit by an object the size of Mars about 4.5 billion years ago. When this hit the Earth it collided and released absolutely immense amount of energy. It completely melted everything in the Earth. The core of the other planet went in and ended up coalescing with the core of the Earth and then there was a load of stuff thrown out: an immense amount of the lighter rocks on the surface. These coalesced into a ring and then probably coalesced into the moon. So the moon is made of much lighter rocks than the Earth. The Earth is denser than it ought to be because it’s just the two cores.
If you have a planetary collision it’s messy but it can give rise to whole new worlds!