Mass of an object is a measure of inertia. It is the measure of the amount of matter in a body and is constant everywhere. But weight is the force due to gravity. If m is the mass of the object and g is the acceleration due to gravity then weight w=mg. Weight varies according to the distance since g is dependent on distance. The weight of an object in the earth is different from the weight of the same object in the moon since the value of g is different in the moon and Earth. But the mass of the object will be the same in the moon and earth.