While phlogiston theory was widely accepted, phlogiston was thought to be the matter of heat. When Antoine Laurent Lavoisier refuted phlogiston theory in place of his oxygen theory in 1774, he still needed a way to explain heat, so he introduced caloric as the matter of heat.
Count Rumford helped bring an end to the idea of caloric by asking why boring a cannon repeatedly does not result in a loss of caloric, therefore a loss of its ability to produce heat.