Caramelization is one of the many changes that take place when food is exposed to heat, a process known more commonly as "cooking." Proteins like meat and eggs become firm and opaque. Vegetables change color and soften. Fats liquefy. Starches swell and expand like little sponges.
Carbohydrates, the sugars found in starches and in fruits and vegetables, turn golden brown and form new flavors when exposed to high temperatures. This transformation is called caramelization, and indeed it is literally the process that causes sugar to turn into caramel. Caramelization, in turn, is caused by pyrolysis, which is a broad category of changes that a substance undergoes when exposed to certain temperatures.
Meat is another food that turns brown when you cook it, and this is also due to pyrolysis. But the difference is that with meat, pyrolysis causes a reaction in the amino acids in the protein (known as the Maillard reaction). Whereas with carbohydrates, pyrolysis reacts with sugars, causing caramelization.
Dry Heat Cooking Required for Caramelization
In either proteins or starches, the effect of pyrolysis requires high temperatures. In the case of ordinary sugar (or sucrose), caramelization begins at around 320 F. Fructose, which is found in fruits, vegetables, and honey caramelizes at a much lower temperature, around 230 F. With the Maillard reaction, browning starts at about 310 F.
What this means is that caramelization and browning can only happen in a dry-heat cooking environment. That is because the highest temperature water can reach is 212 F and that's not hot enough to pyrolyze sugars or proteins. Thus, you can't caramelize anything by boiling it, simmering it, poaching it, or anything like that involves cooking it in liquid.
Caramelization happens with toast and baked bread in general. It's the same dough on the outside of the bread as on the inside. The only difference is that the outside was exposed directly to the hot air in the oven, which caused it to caramelize and turn brown. The dough inside the loaf was only exposed to other dough, which contained liquid, and thus never achieved a high enough temperature to turn brown. While caramelization does produce new colors and new flavors, it does not produce new vitamins or other nutrients.
Deep Frying and Caramelization
Another fun fact is that deep-frying will obviously produce golden-brown colors, even though french fries are made by immersing them in hot, liquefied fat. How can a liquid be dry? In the case of fat, it's considered dry because when you're deep-frying, the fat is hotter than the boiling point of water. This means any water in the food (at least in the exterior part of it) gets cooked away, and then the caramelization begins. All those bubbles you see when something goes into the deep-fryer is the water in the food boiling off.
New Flavors Formed
Another effect of caramelization is that it forms new flavors, including flavors you might describe as buttery, or sweet, or nutty, or toasty. Each of these flavors results from the creation of flavor compounds (i.e. chemicals) as byproducts of the pyrolization process.
As it happens, these compounds can be isolated and then added to foods. When you see something called "natural flavors" in the ingredients list, that is often what they are.