Weight is the force acting on an object because of gravity. It is a force, so it is measured in newtons (N). Mass is the amount of matter in an object and is measured in kilograms (kg). They are not the same thing: the mass of an object stays the same wherever it is, but its weight can change.
The weight of an object depends on its mass and on the gravitational field strength, g, where it is. The equation is weight = mass × gravitational field strength, or W = m × g. Gravitational field strength is measured in newtons per kilogram (N/kg). Near the Earth's surface g is about 10 N/kg, and on the Moon it is about 1.6 N/kg.
A person of mass 70 kg has a weight of 70 × 10 = 700 N on Earth. On the Moon the same person has a weight of 70 × 1.6 = 112 N, but their mass is still 70 kg. An object of mass 5 kg weighs 5 × 10 = 50 N on Earth. Rearranging gives mass = weight ÷ g.