Since astronauts appear to be "weightless" in space, there is an assumption that space is a place with zero gravity. While there is less gravity in space, the idea that there is none is factually incorrect.
There isn't just gravity on Earth, on the moon or even on the sun -- it's all around us. Gravity is responsible for keeping our feet planted on the ground and it's also the way that planets and satellites maintain an orbit. The reason why space allows humans to be weightless is because they are gravitating toward the Earth at the same rate as their ships