When a lamp burns, tungsten from the filament evaporates
With incandescent lamps, these particles are deposited on the inside walls of the bulb envelope, blackening them and reducing the lumen output.
Tungsten Halogen Lamps
In tungsten halogen lamps, bromine gas (a member of the halogen family, therefore the name tungsten halogen) is contained within the bulb When halogen atoms from the filament combine with the bromine vapor, tungsten bromide is formed which will not adhere to the hot bulb envelope.
Tungsten Halogen lamps are much smaller in diameter than incandescent, causing the bulb wall to maintain a temperature higher than 250 degrees centigrade while burning. Instead the tungsten bromide migrates back to the filament, where the it is reduced to tungsten particles & bromine vapor. The tungsten is redeposited on the filament, and the bromine recirculates to continue the cycle.
The drawback during the cycle is that the tungsten is not deposited evenly on the filament, otherwise it would burn forever. Since it is deposited unevenly, the lamp will burn out when a thinner section of the filament gives out. But, this takes much longer with a tungsten halogen lamp vs an incandescent lamp.