The half of the moon facing the sun is always lit, but the different phases we view from Earth happen because:

the Earth moves to different positions around the Sun

we only see parts of the lit side as the moon goes around the Earth

only part of the light gets reflected to Earth

the spinning of the moon lets us see different amounts of light