There actually is gravity in space, it’s just that things in orbit are moving so fast they never manage to fall to the surface. Thing about swinging a pair of headphones around your head really quickly. The only reason they don’t fly away is because you’re pulling them in – that’s like gravity does to things flying around planets etc. And if you spin them around slower they might hit you in the head – that’s like what happens if you don’t go fast enough to orbit, and gravity pulls you back in.
Further out in space there is less gravity, mainly because you can get really really far away from anything heavy enough to have lots of gravity, but when we think of people being weightless it’s mainly because of the falling quickly thing 🙂