Food can be cooked in many ways, like Grilling, Broiling, Baking, Boiling, Simmering, Steaming, Pan-frying, and Sauteing, and three different ways that heat can get around, eg. Conduction, Convention, and Radiation.
Conduction is a form of heat transfer that requires physical contact and a conductor to hold the heat electrons. Convection is another form that requires a fluid or gas, and it traverses (circulates) the water/gas. Then there’s the Radiation way of transmitting heat. Radiation is where the heat travels far and fast because it is a radio wave, which is how a microwave works.
Heating food changes the flavor, aroma, and texture because the molecule structure is changed. First, the heat is transferred to the food, exciting the molecules and/or atoms, so they vibrate. Then the molecules split up, and they play somewhat like musical chairs, where they all scramble to get into position in the new structure, or “chair”. They then bond in that structure, and that structure is the altered version of the old one, and therefore it changes the characteristics of the food. Here, I’ll give an example: a potato. When you bake a potato, it becomes wrinkly and brown, and the flesh (inside of the potato) turns dry and interesting-tasting. That’s because of the molecule structure changing!