Ok so the gravitational force the moon exerts on earth is very small. The ocean, however, is affected by it. How gravity works (in a simplistic sense) is that, when you are closer to something, the force is stronger. So, when the moon is close to Earth (at Perigee) the force of gravity is stronger. So the moon pulls the water more towards itself. This results in higher waves occurring when the moon is closer (at perigee) than at apogee.
And a water molecule, this is called a dehydration synthesis. when 2 molecule combine, a water molecule leave.