Several factors influence the thermal stability of a compound, including its chemical structure, presence of impurities, and environmental conditions. Structural features such as functional groups, bonding type, and molecular size can significantly impact how a substance responds to heat. Impurities might act as catalysts, reducing the thermal stability and leading to premature decomposition. Additionally, the presence of oxygen and moisture can also accelerate degradation.