A carbon monoxide alarm can be triggered by the buildup of carbon monoxide gas in the air, typically caused by appliances or equipment that are not working properly or are not properly ventilated.