It once seemed that light had energy but no mass, and matter had mass but no energy, until Einstein found that light had relativistic mass, and matter had a rest energy that a nuclear bomb could release. It then became apparent that mass and energy were somehow related.
Mass was originally defined as weight, that was later refined to be gravitational mass. Newton’s law that mass needed a force to accelerate it also led to the definition of inertial mass. They are different because a weightless object in space still needs a force to move it, so it has inertial mass but not gravitational mass. Momentum is mass times velocity, so a photon with no mass should have no momentum but solar sails move when the sun shines on them, and photons are bent by the sun’s gravity. This meant that a photon with no rest mass gains relativistic mass as it moves, so it has momentum (Note 1).
Light in contrast was originally seen as pure energy, which Planck’s equation related to its frequency. Einstein then did for matter what Planck had done for light, namely define its energy. In 1905, he deduced that the energy of matter is its mass times the speed of light squared, or as he put it: E=mc². This let us build atom bombs but it has never been clear why the energy of matter relates to light at all. If matter is an inert substance, why is its energy based on the speed of light?
A processing model can now answer that question. If an electron is many photons repeatedly colliding in many channels, the energy of matter relates to the energy of those photons. Each channel runs the equivalent of a photon with a one point wavelength, whose energy by Planck’s equation is Planck’s constant times the speed of light for one Planck length. If Planck’s constant is one quantum process transferred over a Planck length squared per Planck time, substituting for Planck’s constant in Planck’s relation gives Einstein’s equation for mass and energy (Note 2).
Note 1. Relativistic mass is defined by special relativity. Rest mass is mass with no relativistic effects.
Note 2. In this model, the speed of light c=LP/TP, for LP Planck length and TP Planck time. A photon’s energy EP=hP.c/l, for hP the energy of one quantum process transfer, c the speed of light and l the wavelength. In an electron l is one node, so EP=hP.c/LP. If mass m is the program that repeats, h transfers m over a Planck length square every cycle, i.e. hP=mp.LP.LP/TP. Substituting gives EP= mp.LP.c/TP, or EP=m.c2. This derivation doesn’t prove E=mc2. Einstein did that based on how our physical world behaves. It just finds this model consistent with Einstein’s equation.