Not a stupid question at all! Mass is probably one of the most complicated concepts in physics. I'm not even kidding when I say this.
Roughly speaking, though, stuff in the universe can be split into two types: energy and matter. Photons, and a few other things, carry energy around and that's it. They don't need to have a mass. You can kind of pretend that Einstein's E=mc^2 is in play here, because it's telling us that mass is "just" another way of carrying energy around.
Matter, on the other hand, is the stuff that has mass. It's a measure of actual substance, as opposed to being pure energy. There is no point in pretending that this isn't confusing, but if you start by trying to make this separation then I hope it helps: energy carriers don't need to have a mass, or a substance, in order to do their job.