Carbon dioxide extinguishes fire by displacing oxygen. Since carbon dioxide inside an extinguisher is really cool, hence it helps in cooling down the fuel when used. The carbon dioxide is also very cold as it comes out of the extinguisher, so it cools the fuel as well.