Theia was about the size of Mars and orbited the Sun, nearly along the same orbit of early Earth.
But around 4.5 billion years ago, Theia and Earth collided. And some of the resulting ejected debris gathered to form the Moon.
One clue for this giant-impact hypothesis can also explain why Earth’s core is larger than expected for a body its size. Theia’s core and mantle fused with Earth’s core and mantle.
Another clue is that lunar rock samples retrieved by Apollo astronauts were found to be very similar in composition to Earth’s crust. So they were likely removed from Earth in some violent event.
Source