Until 1772, many scientists thought that substances contained something they called phlogiston. When the substances burned, the phlogiston escaped leaving a solid ash called calx. This theory explained why the mass after burning fuels was less than the original mass.
Careful experiments that measured the masses of gasses showed that the phlogiston theory was wrong. This led to the discovery of oxygen. However, some scientists continued to believe in phlogiston. They thought this explained the heat and light given of in combustion reactions. Today we see this as evidence of the transfer of energy to the surroundings.