There are two useful answers
The Moon rotates once relative to distant stars in about 27.3 Earth days. This is its sidereal rotation period. But while it rotates, the Moon and Earth are also moving around the Sun. The Moon must turn a little farther before the Sun returns to the same place in its sky.
The interval from one local lunar noon to the next, or sunrise to sunrise, is about 29.5 Earth days. This synodic day is the same length as the phase cycle seen from Earth.
Two weeks of light, two weeks of darkness
For most locations away from the poles, daylight lasts roughly half of the synodic day: about 14 Earth days. Lunar night lasts about another 14. Temperatures swing dramatically because there is essentially no atmosphere to transport heat or soften the transition.
At the poles, local topography and the Sun’s low angle create unusual lighting. Some elevated areas receive extended illumination, while deep crater floors can remain in permanent shadow.
Why the same side faces Earth
The 27.3-day rotation period matches the Moon’s 27.3-day orbit around Earth. This synchronous rotation keeps nearly the same hemisphere facing us. It does not mean the Moon fails to rotate. If it did not rotate, we would see every side over one orbit.