Malting is actually sprouting the barley, and this makes the enzymes available for mashing. It is the enzymes that convert the long chain starches into shorter chain sugars during the mash.
To malt the barley, it is washed, steeped in water, allowed to germinate uniformly by keeping it damp and turning the piles of grain, and then before the tiny sprout emegres from under the husk, the germinating process is halted by drying the barley out. The grain is then gently dried. As the amount of moisture decreases, the temperature is increased. When finally dried, the grain is tumbled to remove the rootlets.
If the barley is allowed to sprout too much, all of the seed energy reserves (starch) are used up and there is nothing left to mash. If the barley is not sprouted enough, there are not enough enzymes to perform the mash.
Malting is one step of the marvelous procedure of making beer. Once again, I am amazed at the technology that has developed and evolved around brewing.