Tides are caused by the gravitational forces of the sun and the moon. The key understanding to how tides work is the relationship between the motion of our planet the, moon and the sun.
This causes the water to "bulge" because as the moon orbits earth and earth rotates, the bulge also moves. In the areas where the bulge occurs high tide occurs and other ares have low tide.
But water on the other side of the earth also has high tide but for a different reason in reality the earth and moon remove together around a center of mass or a sun.
A good way to imagine how tides work is picturing yourself swinging a heavy object around your body while you rotate, you have to lean back to compensate, which
Which puts a center of mass between you and that object, and it causes a bulge. In the earth and moon system gravity is like a rope that pulls or keeps two bodies together. And centrifugal force is what keeps them apart.
And because centrifugal force is greater then the moons gravitational pull so that is why the ocean water on the other side of the earth bulges. And that is how ocean tides basically work.
Tides most commonly occur twice a day and that is called diurnal. But also tides can occur as two high tides or two low tides and that is called semi-diurnal.
That is because the moon takes slightly longer then 24 hours to line up exactly again. It takes about 50 minutes longer. Also because of this high tides throughout the course of a month are staggered
WITH EACH TIDE STARTING ABOUT EVERY 24 HOURS AND 50 MINUTES APART FORM THE ONE THAT HAPPENED BEFORE IT. ALSO tides can be predicted to the exact time that they will happen.