"Mass", as referred to by physicists is what may be known to others as "rest mass" or "invariant mass". An electron and a positron both have rest-mass. (Think of it as a fundamental property, like charge.) When they collide, the result is two photons that no longer have rest-mass.
It is important to note that gravity affects energy (mass-energy). This is why a compressed spring weighs more than the same spring uncompressed. A spinning ball weighs more than the same ball when it is stationary because there is more energy.
It's an important but subtle distinction that even a lot of physics professors don't quite grasp. Matt Strassler has some very good explanations of it on his page.
Couple of points along the same lines that I always like to explain to people.
The familiar E=mc^2 we all know - people like to say that means that the energy in a system is equal to the mass times the speed of light (squared) - if we convert between the two. Which is true..... but it's also saying something else. In this formula, energy is measured in joules, and mass in kilogams - the speed of light in meters per second. Importantly, notice the c^2 is a constant - it's there for unit conversion. What we really have is a statement that energy=mass. Energy and Mass are the same thing.
In the same line - there's no such thing as "pure energy" (if I'm wrong, someone educate me, I'm all ears) - people have a hard time with this. Energy is a property of a system that can be calculated. "pure energy" doesn't exist. Radiation is not what we mean by "energy" (though obviously it's got energy) - energy is a property that we can calculate and work with, and a rather important one at that.... but it's not a "thing" or "stuff" or "non-stuff" that moves around... it's a property of a system that can be calculated.
Yep. Energy is one of the more difficult things to explain, because it's really more of a mathematical property that results from a conservation law about symmetric transformations (Noether's theorem).
It is important to note that gravity affects energy (mass-energy). This is why a compressed spring weighs more than the same spring uncompressed. A spinning ball weighs more than the same ball when it is stationary because there is more energy.
It's an important but subtle distinction that even a lot of physics professors don't quite grasp. Matt Strassler has some very good explanations of it on his page.