Ocean tides are a result of three things, the sun, the moon, and the rotation of Earth. Tides don't just apply to the ocean and applies to all things that rotate the way they do and have a gravitational field that varies. This includes solid objects on Earth too, but it's not easily seen because it's not like water.
Ocean tides are caused by the gravitational forces of the Moon and, to a lesser extent, the Sun. The Moon's gravity pulls water towards it, creating bulges or high tides on both the side facing the Moon and the opposite side. Earth's rotation through these tidal bulges results in two high and two low tides each day.
;