If we are comparing two different things to each other on Earth, they are pulled the same by gravity and so the one with more mass weighs more. But in space, where the pull of gravity is very small, something can have almost no weight. It still has matter in it, though, so it still has mass.