Essentially, the lightbulb is a very thin filament of hard-to-melt metal tungsten, usually encased in a glass bulb filled with inert gases so that the filament doesn't oxidise and disintegrate. The electricity causes the wire to glow and a portion of that energy is turned into light.