Gravity is the reason things with mass or energy are attracted to each other. It is why apples fall toward the ground and planets orbit stars.
Magnets attract some types of metals, but they can also push other magnets away. So how come you feel only the pull of gravity?
In 1915, Albert Einstein figured out the answer when he published his theory of general relativity. The reason gravity pulls you toward the ground is that all objects with mass, like our Earth, actually bend and curve the fabric of the universe, called space-time. That curvature is what you feel as gravity.
What is space-time?
Before getting into the complicated world of gravity, you need to understand space-time.
Space-time is exactly what it sounds like: the three dimensions of space — length, width and height — combined with the fourth dimension — time. Using some very brilliant math, Einstein was the first person to realize that the laws of physics work in a universe where space and time are merged together.
What this means is that space and time are connected — if you move really fast through space, time slows down for you compared to someone who is moving slowly. This is why astronauts — who are moving very fast in space — age a tiny bit more slowly than people on Earth.
Matter makes gravity wells, not gravity hills
Remember, gravity is the idea that objects in the universe are attracted to each other because space-time is bent and curved. When Einstein came up with general relativity, he showed that all stuff in the universe can curve space-time — in physics terms that stuff is mass and energy.
Since your brain usually thinks about the world in three dimensions, it is really hard to think about the four dimensions of space-time as a single idea. So to make it easier to visualize, imagine the surface of a trampoline. If there is nothing on it, it is flat. But if you stand on the trampoline, it stretches around your feet and creates a valley with you at the center. If there is a ball on the trampoline, it would roll toward your feet.
This is a two-dimensional example of how space-time works. Your mass stretched the trampoline, creating what is called a gravity well that the ball rolls into. This is very similar to how the gravity of a heavy object — like the Earth — pulls things like you and me toward it.
To make things even weirder, since space and time are connected, time is also stretched by heavy objects!
The heavier you are, the steeper the sides of the trampoline well. That is why really massive things in the universe — like the Sun or black holes — have stronger gravity than Earth.
So why does gravity pull you down and not push you away?
Imagine someone went under the trampoline and pushed up. The ball would roll away! This would be a gravity hill, not a gravity well. As far as scientists know, matter — or stuff — always makes gravity wells and not gravity hills. Scientists can imagine things made of exotic matter or energy that would cause gravity to push you off into space, but so far, no one has found anything that could cause gravity to push you away from Earth.