High tides and low tides come and go, as the level of the sea goes up and down. This reassuring cycle of two high tides and two low tides occurs most days on most of the coastlines of the world.
The Moon gets most of the credit. The Moon has only about 1/100th the mass of Earth. Even so, it has enough gravity to affect us. As Earth rotates, the Moon exerts its gravitational pull on Earth. The land masses don't pay much attention to this little tug, but the oceans, being much more "flexible," respond by bulging "up" toward the Moon. The bulge stays on the Moon-facing side as Earth turns beneath it.
That explains one high tide per day, but what about the other high tide?
The ocean also bulges out on the side of Earth opposite the Moon.
If the Moon's gravity is pulling the oceans toward it, how can the ocean also bulge on the side of Earth away from the Moon?
To explain, let's first talk about center of gravity. An object's center of gravity is the exact center point of all its mass. For example, for an ordinary 12-inch ruler, the center of gravity will be at the 6-inch mark. You will be able to balance the ruler on one finger at that point. Objects that have more mass on one side than the other will have a center of gravity closer to the more massive part. For example, the center of gravity of a sledge hammer will be somewhere inside the hammer's heavy head, rather than out in the wooden handle somewhere, even though the handle takes up more space.
Now, when two objects are gravitationally locked together in orbit, they are actually both orbiting their common center of gravity. So the Moon isn't orbiting Earth's center. Rather it is orbiting the center of gravity of both objects combined. Since the Moon's mass is about 1/100th of Earth's, the center of gravity of the Earth-Moon system is not the center of Earth. Instead, it is about 1,722 kilometers (1,070 miles) beneath Earth's surface, or a bit over one-quarter of the way to the center of Earth. (Earth's radius is about 6,378 kilometers, or 3,963 miles).
Now let's talk about another effect besides gravity that is at work on this system. Imagine spinning a ball around on a string. The ball really wants to continue in a straight line perpendicular to the string. If the string suddenly broke, that's exactly what the ball would do. It looks as if two forces are working on the ball: one pulling it inward and one pulling it outward. But this second "force," called centrifugal (meaning "center-fleeing") force, isn't really a force at all. If the string broke, there would really be no forces (discounting gravity and air drag) acting on the ball, and it would fly off in the same direction it was already going.
With the center of gravity of the Earth-Moon system being closer to the Moon-facing side of Earth than the opposite side, the Moon (on one side) and more than 75% of Earth's mass (on the other side) are being "swung around" their center of gravity. So the oceans that are on that more massive side of the center bulge out as if they were the ball pulling on the gravitational string.
The Moon's gravitational pull on the side of Earth nearest the Moon is strong enough to overcome the centrifugal force and pull the oceans toward the Moon. The Moon's gravity is tugging on the far side of Earth too, but because that side is farther away, the Moon's gravity is too weak to overcome the centrifugal force. Thus the oceans bulge on that side as well.