The moon is tidally locked with Earth, which has the effect of synchronizing its rotation period with the period of its orbit. Completing one "day" per orbit of the Earth, the moon has shown the same face to the Earth for billions of years.
Tidal locking occurs when a massive object holds a somewhat less massive object in its orbit. The less massive object feels a strong pull from the gravity of the larger object and thus suffers from high solid-body tides. These tides rob the orbiting object of some of its energy and slow its rotation.
As an object such as the moon orbits a more massive world, the gravity of the large world tugs harder on the part of the moon closest to it. This tug, repeated over many millions of orbits, has the effect of gradually pulling the orbiting object into a tidal lock.
When it first formed, the moon probably rotated on its axis at a higher rate than it orbited Earth. At that time, however, the moon was much closer to the Earth than it is in modern times, and the tides Earth raised on the moon were enormous. This quickly, by astronomical standards, pulled the moon into the tidal lock it would have for billions of years. These processes are at work everywhere in the solar system and, given enough time, would eventually pull every world in the solar system into a tidal lock with the sun.