Air fryers cook food by circulating hot air at high speeds. The heating element generates intense heat, while the fan ensures that the hot air spreads evenly, cooking the food thoroughly from all sides.