The Earth is not a ball of solid rock. The inside is molten, and most of the surface of the Earth is covered in water. The water is free to move, and it does. It is attracted by the moon as it orbits the Earth, and the Sun as the Earth orbits the Sun and spins on its axis. The effect is that huge volumes of water wash around the Earth. The level of water rises and falls about twice a day, in roughly a twelve hour cycle.
The highest tides, called spring tides, occur when the Sun, Earth and moon are aligned in a straight line. The tides are actually due to gravitational forces because of the pull of the moon and the Sun, , centrifugal forces as the Earth rotates and a principle called conservation of angular momentum.
The weakest or neap tides occur when the angle between the Sun – Earth and Earth – moon lines is a right angle. The pull of the moon is greater, but since the Sun and moon are not pulling in the same direction, they do not add to produce the highest tides.