I don’t remember why I looked this up, but the way a halogen lamp works is rather fascinating. The halogen gas (hence the name) surrounds a tungsten filament. Unlike a standard tungsten filament in vacuum, the halogen environment sets up a chemical reaction that essentially recycles the tungsten atoms that leave the filament. In a regular bulb, those atoms would stick to the globe of the bulb and never be used again. In a halogen bulb, they make their way back to the filament (but not necessarily where they started). Ultimately this makes the filament last longer, and also keeps the glass very clear since there isn’t a steady accumulation of tungsten atoms on the inside surface.
Science for the win!