In the case of the Earth, its gravitational pull is what keeps you from floating away. The Earth has a very large mass, so it has a strong gravitational pull. This pull is what keeps you on the ground and prevents you from flying off into space.
The force of gravity is one of the four fundamental forces of nature. The other three are the electromagnetic force, the strong nuclear force, and the weak nuclear force. Gravity is the weakest of the four forces, but it is also the most long-range. This means that it can act over very large distances, such as the distance between the Earth and the Moon.