Moon phases are caused by the motions of the Earth and moon as they relate to the sun. Phases occur as the Earth-facing side of the moon changes over the course of 29.5 days when the moon revolves around the planet. When the angle of sunlight reflecting off the moon changes, humans observe different lighting levels from the moon. These phases are full, waning gibbous, third quarter, waning crescent, new, waxing crescent, first quarter and waxing gibbous. Each phase lasts approximately seven days.
A new moon occurs when the moon is on the same side of the sky as the sun. A full moon rises on the opposite side of Earth as the sun. A half moon is halfway in between a new and full phase. During a new moon, the opposite side of the moon is lit entirely by the sun. The moon rotates on its axis at the exact same rate as its revolution around the Earth, so the same side of the moon always faces toward Earth.
The reason why humans view a full moon on the opposite side of the Earth from the sun is because the orbit of the moon wavers by as much as 5 degrees away from Earth's orbit. Eclipses occur when the Earth, moon and sun align precisely in the same plane of the solar system so the moon is in Earth's shadow or the Earth is in the moon's shadow.