The Moon is our closest celestial neighbour and Earth’s only natural satellite; it orbits the Earth at a distance of around 380,000 km.
The Moon is believed to have once been part of the Earth but during the early stages of the formation of the solar system the Proto Earth was involved with a collision with another body around the size of Mars (about 1/2 of the diameter of Earth).
After the collision, the debris thrown up in the impact would have formed rings around the Earth, like the rings we see around Saturn. The Moon would have slowly built itself up from the largest lump attracting the debris in the rings until it finally formed the Moon as we see it today.