How LEDs work
A light-emitting diode (LED) consists of a section of N-type material (which has extra electrons) bonded to a section of P-type material (which has extra protons). This video explains how light is generated when the sections are connected to an energy source such as a battery.

