Fire glass works by forming a barrier that prevents the spread of fire, smoke, and heat, helping to contain the fire and protect occupants.