Theia is a hypothetical planet that is thought to have hit the Earth 4.5 billion years ago. The theory says that Theia, a Mars sized planet, hit the Earth and the debris from the impact formed the Moon. It is also thought that the Earth's water came from Theia.
Animation of the possible collision between the Earth and Theia
According to NASA, it is possible that once Theia crashed, it was destroyed. The debris from both the Earth and Theia merged, and formed two bodies. The bigger one was absorbed into Earth by its gravity, and the smaller one was pushed far enough that it wasn't absorbed, but close enough that it stayed in orbit. That smaller body became the Moon.