The particles in a substance have the same mass whatever state it is in. What changes between solid, liquid and gas is how many particles fit into each unit of volume.
In a solid the particles are close together and held in a regular arrangement. They are closely packed, so there are many particles in each volume and the density is high. For most substances a solid has the highest density.
In a liquid the particles are still close together, but they are not in a regular arrangement and can move past each other. There is slightly more space between them, so the density of a liquid is usually a little lower than the solid. Solids and liquids have similar densities.
In a gas the particles are far apart and move randomly. There are very few particles in each volume, so a gas has a very low density, about a thousand times lower than a solid or liquid.