There seems to be some confusion here. First of all, John Baez’s site listed by bpeoples is very good. However, I think this can be answered relatively quickly. When we talk about “mass”, what we often mean is rest energy. That is, if you have a particle in a frame where it is not moving, its energy is given by E=mc^2, where c is the speed of light, and m is the mass. The more complete formula for energy is given by
E^2=m^2c^4+p^2c^2
where p is momentum. The fact that the photon is massless is equivalent to the statement that its energy is just given by E=pc, which is also sometimes written as E=h\nu where h is planck’s constant and \nu is the frequency of the photon.
A photon can never be at rest—it is always moving at the speed of light. This does not mean that photons are without energy. Indeed, as alluded to by elliottcable, the reason that black holes are “black” is that light cannot escape from them. This is due to the fact that, gravity is a force which couples to energy and not just mass.
In response to nomtastic, a particle which is massless can acquire a mass through the Higgs mechanism (also sometimes the Anderson-Higgs mechanism), which should have a good entry on wikipedia. However, this is not something that we expect to happen to the photon—the requisite scalar fields which are electromagnetically charged don’t seem to exist.