Malted barley is made by soaking barley in water to jumpstart germination. This causes starches stored in the barley seed to begin converting into the sugars that the plant will need to grow. These sugars will ultimately be used during the beer-making process to feed the yeast and cause the beer to ferment.
At this point, the malted barley gets roasted and dried for storage. The brewer will later cook the grains in hot water to extract those sugars into the liquid for brewing.
By the way, malts can be made from other grains, like wheat or even corn. Barley is definitely the most common and the most versatile.
Our understanding (and beer buffs, please chime in) is that the malty and sweet flavors in the finished beer are mainly a result of how much sugar is left after fermentation and how the malt barley was roasted. In a very light or bitter beer, most of the sugars were used during fermentation. In a heavy, sweet beer, more sugars are left in the finished beer.
How much maltiness do you like in your beer? Any recommendations?
Related: Gift Idea: Beer Bread Mix