Once the barley has been malted and roasted, the grain is full of starch and enzymes. The grains are then dried and roasted. At his point, it is critical that the amylase enzymes not be denatured. Denaturation is any process that renders enzymes inactive. Heating (i.e. cooking) will denature proteins (enzymes are proteins). Roasting the barley too hot could destroy the critical enzymes. But, fear not, the folks who do the roasting know exactly what they are doing.
When the barley is roasted it is ready to be mashed. For extract brewers, this is something that isn't done. For all-grain brewers, mashing is a critical process. A screw up here and the whole batch could be ruined. Mashing essentially breaks up the starch into fermentable sugars. No sugar, no beer.
As I have mentioned before, I am now doing partial mashes (I'll post later about my method). In fact, all four batches featured recently were partial mash batches.
There are a lot of things that happen during a mash. I will focus on the action of amylase in the context of doing a partial mash.
During mashing, malted barley is heated in water. For partial mashing about 1 liter of water is used per pound of grain. The temperature control is critical since the amylase activity is dependent on temperature.
There are two main amylase enzymes at work. The enzymes are formed during the malting process thanks to the action of gibberillic acid. The two enzymes are alpha-amylase and beta-amylase.
They both break glycosidic bonds between the glucose molecules in starch. However, alpha-amylase does so randomly and beta-amylase starts at the end of the starch chain (the non-reducing end) and chops off two glucoses (maltose) at a time. The optimum temperature for alpha-amylase activity is around 158° F and that for beta-amylase is around 145° F. In all grain brewing temperature control is absolutely critical since the amylase activities must be balanced out. In partial mashing a temperature compromise is reached. At 152-154° F the activities of both enzymes are good enough to result in decent conversion.
The goal is to not convert all of the starch into glucose or maltose. Unless you are trying to brew a very dry beer with very low residual carbohydrate levels (i.e. T.A.L.L.). If beta-amylase activity is allowed to dominate, the result is a highly fermentable wort and a dry beer.
A great description of partial mashing is available on the BYO website