People generally think of light, such as the beam of sunlight streaming through a window, as rays. Physicists often describe light in terms of waves, which have measurable wavelengths and frequencies. But there is another way to think of light and that is as particles, discrete bundles of energy that act very much like matter.
The particle theory of light recognizes that light can be produced when the electrons in an atom accelerate. This acceleration can happen when a substance is heated (as when electrical current flows through a light bulb filament) or when an atom's electrons collide with electrons from another source. In either event, an atom's electrons take on energy and rise to a higher-energy-level orbit, to what physicists call an "excited state." Because this orbit is unstable, each electron quickly drops to its original energy state and in the process releases a small, discrete bundle of electromagnetic energy called a photon.
Single photons are the smallest quantities of light and, despite having no mass, have many properties in common with particles. In fact, physicists often think of photons as particles -- particles that sometimes behave like waves. Physicists sometimes describe all particles as waves -- even those with mass, such as electrons and protons -- in order to better understand certain aspects of their behavior.