A lightbulb, quite simply, is a small metal wire that is glowing from heat dissipation. Most common lightbulbs are made from the metal tungsten (W on the Periodic Table). Tungsten is used because it remains solid at very high temperatures. Most of the air is sucked out of the bulb, forming a semi-vacuum. If a vacuum isn't acheived, the tungsten would burn out immediately. When a light bulb "burns out", the filament slowly vaporizes; the black on the inside of a burned out lightbulb is really just resolidified metal vapor.

The actual process of creating light is very simple. Electricity flowing through the wire causes the tungsten to heat up and begin to glow (similar to molten steel glowing white hot). It heats up due to its resistance. When electricity passes through something, the substance it is passing through tries to hold on to the electrons. The electrons have to be forced through, and some of this force is absorbed by the metal and given off as heat. As the tungsten filament heats up, it gives off light.

The heat energy goes into electrons of the tungsten atoms. The energy pushes the electrons farther away from the nucleus of the atoms (they move up in energy level). As the electrons fall back to their original energy level, they give off photons which are really little bits of light.

Fluorescent lightbulbs work similarly. Electricity moves in pulses through a tube. The electricity hits the molecules inside the tube and their electrons are knocked away. As their electrons fall back, light is given off. In this case, the electrons are knocked off by electrictiy, not heat, and therefore, fluorescent lightbulbs can be cooler. Because they are cooler, nothing vaporizes, and the fluorescent lightbulb lasts longer.