Fire codes are regulations that govern how buildings are built to prevent fires and ensure the safety of people inside.