Before the invention of the electric toaster, people had to use fire to make their toast. They did so by holding bread near a fire using a poker, putting bread under the fire-broiler of an oven, or trapping some bread in a little cage that was put close to the fire and rotated for even toasting on both sides.
Modern, electric toasters save us some time in making toast and help to minimize burning on both the bread and ourselves! What we've lost in the process is the ability to watch our bread transform as it is toasting. So what's really going on in there?
Inside of electric toasters, electric energy is converted into thermal energy. Coils of wire or plates of metal line the inside of the toaster. Special kinds of metal with high "resistance" are used because energy passes through these more slowly, causing the wire or plate metal to heat up. As heat radiates from the electrified metal, it begins to caramelize some of the sugars in the bread. As sugars in the bread caramelize, their flavor and color changes. Caramelization is responsible for most of the flavors we find pleasing in foods, even when there's no caramel involved!
In sum, we put bread into the toaster, where it is heated up and some of the sugars contained in the wheat become caramelized!