Gluten is found in wheat, giving the texture to bread, and to a lesser extent in other cereals. Other grains contain lower amounts of gluten or none, which is why breads made from them do not have the same textures as wheat breads. Gluten is created by two proteins - gliadin and glutenin. Wheat also contains two other key proteins - albumin and globulin - but these are soluble in water and dissolve when the flour is wetted, react and form elastic strands.
Gliadin are shorter chains than glutenin, which has longer protein chains. When dough is kneaded, the longer glutenin molecules are pulled out straight. The shorter gliadin molecules then form cross-links with the long glutenin molecules, creating an elastic web of protein chains. This web is the gluten, and you can feel this change occurring as you knead the bread dough. A few minutes of kneading are needed to draw out these long strands of gluten, but excessive kneading can overstretch the gluten and break the strands and the dough loses its springiness. It is this stretchy gluten that enables the light crumb structure of leavened bread to be formed, but also celiac disease.
By adding yeast, this gluten mesh is further expanded by introducing carbon dioxide bubbles, causes the dough to expand, rise and so leavening the dough. On baking, this gluten network coagulates around the gas bubbles, so creating an aerated fibrous structure, the light, open crumb structure of real bread.
Gluten needs to be tough enough to have strength when leavened, but not too tough to prevent it from blowing up with the carbon dioxide bubbles. Gluten is toughened by adding salt (dough without salt is sticky) or by acid (sour milk in scones or lemon juice in puff pastry), but is made softer by fat, sugar, yeast enzymes, malt enzymes, bran and germ.
A softer texture is needed for pastries and cakes. By adding fats like butter or margarine, you allow the strands of gluten to slip and not to become fully stretched. This gives a crumbly, softer cake texture. Likewise in making pastry, it is important not to knead very much and so prevent the formation of gluten. Leaving raw pastry to "relax" allows any stretched strands to return to their original shape.
Different types of wheat contain differing levels of protein, resulting in different gluten forming capabilities. A strong flour has higher gluten content , so a high-rising, high water-absorbing quality, which makes a larger volume of dough with a light, open texture that is great for bread. In contrast, a lower gluten, soft, starchy flour usually makes the best cakes.
Allergies to gluten create celiac or coeliac disease. For those who have celiac disease, gluten cereals must be avoided. Gluten-free cereals include millet and quinoa. Not all cereals contain gluten, which those that are not being called gluten free.