Tides are caused mostly by the moon's gravitational pull. The illustration below shows how it can be produced by the pull of the moon. Where the earth is closest to the moon, the pull of the oceans is greater than the pull on the solid land. On the side furthest away from the moon, the moon's pull is weaker.
The sun is also a factor in the causes of tides, but not as great as the moon because it is much further away. It causes the same effects as the moon but in a smaller version. The water is most affected by the sun during new and full moons.
The main point is... The further the moon, the lower the tide, and the closer the moon, the higher the tide.