Weight is a function of mass times gravity, so it can be changed while either of the other two variables remains constant. If the mass of a body remains unchanged, its weight can fluctuate in response to the effect of gravity.
NASA describes weight as the force generated by the mutual attraction of a body and the Earth. This force diminishes with distance, so it is possible to reduce a body's weight by moving it to a location, such as the surface of the moon, where the gravitational constant is lower. Another way to lower the perception of weight is to achieve free fall, which is the reason astronauts experience weightlessness.