From a relativistic point of view, the energy of a particle with mass $m$ and momentum $p$ is given by:
where $c$ is the speed of light. You can clearly see that a massive particle will have some mass energy $E_0=mc^2$, but also some kinetic energy.
The photon being massless, the above equation reduces to:
One consequence of this equation is that if a photon exists, i.e. has a non-zero energy, it must be moving.
There is no "conservation of mass" law in physics - instead, we use the more general concept of conservation of energy (since from the first equation above, mass can be understood as a form of energy). The energy of the photon is related to its frequency by the Planck-Einstein relation:
where $h$ is Planck's constant and $\nu$ is the frequency of the associated electromagnetic wave (remember that the photon is "the particle of light", i.e. an excitation of a field). Since you know the speed of light, $c$, and its frequency $\nu$, you can also derive its wavelength:
And the energy of the photon can then be expressed as:
Finally we get:
which is nothing else than the de Broglie wavelength, and the basis for quantum mechanics. Indeed, this postulates that a particle (not necessarily massless) with momentum $p$ can be represented as a wave with wavelength $\lambda$.