The moon orbits the Earth every 27 days on average at a distance of 384,400km. It was likely formed from debris ejected from Earth after a collision with a Mars-sized object. The different phases of the moon are caused by the illumination of its surface from the Sun as it orbits Earth. The moon's gravitational pull causes ocean tides on Earth and influences their size.