In classical physics, mass plays a triple role. First of all, it is a measure for how easy it is to influence the motion of a body. Imagine that you’re drifting in emtpy space. Drifting by are an elephant and a mouse, and you give each of them a push of equal strength. The fact that the mouse abruptly changes its path, while the elephant’s course is as good as unaltered, is a sure sign that the mass (or, in the language of physics, the inertia or inertial mass) of the elephant is much greater than that of the mouse. Secondly, mass is a measure of how many atoms there are in a body, and of what type they are. All atoms of one and the same type have the same mass, and adding up all those tiny component masses, the total mass of the body results. Thirdly, in Newton’s theory of gravity, mass determines how strongly a body attracts other bodies via the gravitational force, and how strongly these bodies attract it (in this sense, mass is the charge associated with the gravitational force).
In special relativity, one can also define a mass that is a measure for a bodies resistance to changing its motion. However, the value of this relativistic mass depends on the relative motion of the body and the observer. The relativistic mass is the “m” in Einstein’s famous E=mc² (cf. equivalence of mass and energy).
The relativistic mass has a minimum for an observer that is at rest relative to the body in question. This value is the so-called rest mass of the body, and when particle physicists talk of mass, this is usually what they mean. Just as in classical physics, the rest mass is a kind of measure for how much matter the body is made up of – with one caveat: For composite bodies, the energies associated with the forces holding the body together contribute to the total mass, as well (another consequence of the equivalence of mass and energy).