Mass can be considered as a fundamental characteristic property of matter. In other words, if there is matter, there is mass. An electron and an elephant are both matter; both have mass. If we know the volume of the matter, we can calculate Density, which is the Mass divided by the Volume. As the prior post states, the mass of a particular piece of matter, whether elephant or electron, remains the same throughout the Universe.
What changes is the weight of matter. Weight, unlike mass, is a derived property of matter, or simply the product of the mass times whatever gravitational force is in play (weight = (mass)(force of gravity).) The weight of matter therefore changes throughout the Universe, contingent upon whatever local fields of gravity there are.
If an elephant weighs 6800 kg on Earth, it will weigh far less on the Moon, because the force of gravity is much less on the Moon. However, upon whichever body the elephant rests, the Earth or the Moon, its mass will be the same in both places.
Because we all live on Earth, where the force of gravity is the same planet-wide, mass has unfortunately become to mean weight.
Since there is a relation between mass and weight, they are oftenly confused.
What you need to know is that the weight is depending on where you are in the universe. For instance, if you are on the Moon, the weight will be another but the mass will be the same.
Mass is the ratio between the force and acceleration (from Newton's 2nd law of Motion).
m = F/a
Mass could be found measuring the weight of an object and applying gravity formula for getting the mass.
G = m*g, g = gravity acceleration = 9.8 approx.
m = G/g
The unit of mass is Kg.