well,

it's tricky to describe.

the short answer is that it shows up in the math.

the "mass" which we are talking about when we say "a shot-put has mass" is a thing which shows up in the momentum of the object. In the four-dimensional mathematics of relativity, an observer will measure his own energy to be equal to his rest-mass.

a photon would describe it's own energy as being zero. (do photons have energy? yes. but they don't have any self-esteem, so they think they don't... HARD TO EXPLAIN)

on the other hand, there's the "mass" which causes spacetime to curve... which is another type of mathematical object called a "stress-energy tensor". photons have non-zero stress energy tensors. so they cause spacetime to curve.

hmmm

maybe i should work out a more intuitive answer to this question

That's very interesting! IIRC, in the pre-Einstein days, there was this big debate in physics regarding the duality between inertial mass (the 'm' in Newton's F=ma) and gravitational mass (the m's in gravity's F=Gm

_{1}m

_{2}/r

^{2}. Like, the two have always turned up to be exactly the same in every measurement in every object under any circumstances, but there was no theoretical reason why they should be the same, or even related.

Now, I know (or

*think* I know, correct me if I'm wrong) that general relativity united those two concepts into a coherent whole. But, going back to that duality for a moment - is what you're saying more or less the same as saying that electrons have zero inertial mass, but nonzero gravitational mass?