The OP mispoke. It wasn't the moon that collided with earth, but another planet around mar's size. As a result of the collision the the core of that planet combined with the earth and the crust and parts of the mantle were ejected and coalesced into the moon.