The phases of the moon are the result of its orbit around the Earth and the angle at which we view it. A common misconception is that the Earth's shadow causes the phases by creating the dark portion of the moon. Earth's shadow only comes into play in lunar eclipses and the phases are completely the result of light from the sun and our relative position to both. The dark side of the moon is simply the side not facing the Sun.
The moon is a sphere that orbits the Earth as the Earth is also turning on its axis and both bodies are orbiting the sun. This causes the illuminated part of the moon to appear to change from our perspective. The illuminated side is not actually changing, it is just the angle at which we can see it. When the moon is in the new moon phase it is located directly between the Earth and the sun and the shadowed side is facing us. A full moon is the opposite and the moon is behind the Earth with the Earth between the moon and the sun. This allows the fully illuminated side to be visible.
At the first quarter of the moon cycle when the moon is half full, the moon, the Earth and the sun form a right angle. It is a ninety degree angle with the Earth at the vertex. The second quarter moon features the moon, Earth and sun forming a 270 degree angle, again with the Earth at the vertex. The angle formed during the new moon is very small or non-existent and the full moon's angle is 180 degrees, or a straight line.
The boundary between the light and dark parts of the moon as we see it is known as the terminator. The terminator moves from the right to the left from the new moon to the full moon and then from left to right from the full moon to the next new moon. You would think that during the half moons of the first and last quarter that the terminator would be down the middle of the moon. Interestingly, though the terminator is near the middle of the moon during the first and last quarter, the half moons, it is not the exact middle. The moon is not a smooth surface and also because of the way that light bends around object it is actually a few degrees away from the center and does not actually go directly from the north to the south pole of the moon.