What does mean by restmass for the photon? So Photon has a zero restmass. And Photon can never be at rest. What does this suppose to mean? Additionally, We know that photon carries energy so Why doesn't have mass? Mass and energy are the same things to some extent.
 A: It means that all of light’s energy is tied up in it’s kinetic energy. Here’s the relativistic energy equation you’re looking for:
$$E^2=p^2 c^2 + m^2 c^4$$
where $p$ is the momentum. The first term on the right is the kinetic energy, and the second term is the mass energy. This equation is true for light iff $m=0$.
A: Photons are defined as elementary particles in the Standard Model, with no rest mass, you are correct.
You are saying that you see phrases like "a photon can never be at rest", but in reality what we mean is that there is no rest frame for a photon. What we really mean is that there is no inertial frame of reference that could be comoving with the photon. One consequence of this is, that for us, who have rest mass, it is not possible to experience what is would be like to comove with and observe a photon in its own frame (because no such inertial frame exists).
Photons do have energy, even though they do not have rest mass, and this is no contradiction. Photons do have momentum, and $$E^2=p^2 c^2$$ is the correct way to express that for a massless photon energy is related to its momentum.
A: The simplest description of the rest mass comes when using the algebra of four-vectors.
The rest mass of a particle is the "length" of the four vector, and this length is invariant to Lorentz transformations.

The length of the energy-momentum 4-vector is given by



The length of this 4-vector is the rest energy of the particle. The invariance is associated with the fact that the rest mass is the same in any inertial frame of reference.

Due to vector algebra, adding the four vectors of two photons if there is a non-zero angle between them in momentum space, will give an invariant mass, a real example is the $π^0$ particle of mass 135MeV  which decays into two photons.
