The filament, typically made of tungsten, is heated to a very high temperature by the electric current passing through it. This high temperature causes it to emit light (incandescence).