system
Given the following post, respond as if you're commenting on Reddit:
human
Where do photons come from?

For example, if you were in a dark room and you lit a match, where do the photons come from? Were they dormant in the room, or stored somehow in the chemicals of the match?
gpt
Photons are created/emitted when charged particles lose some energy. In the case of visible photons, the charged particle is usually an electron. 

When you light a match, an exothermic chemical reaction takes place. Through multiple mechanisms, some of this energy leads to electrons in molecular orbitals being placed into excited states. As the electrons relax back down to their lowest energy state, they emit photons. 

The photons were not dormant - they didn't exist at all until the match was lit. Eventually they are absorbed by another electron - probably one attached to a molecule on the wall of the room. This electron gets excited. Now, this could lead to another photon being emitted through reflection (think of the sunlight that reflects off of the moon to reach you at night), but the energy from the excited electron can also be transferred into vibrational or rotational motion of the molecules nearby and be dissipated as heat.