What is gluten and how is it formed?
Wheat and other related grains (including barley, and rye) contain a mixture of two proteins glutenin and gliadin. When flour made from grinding these grains is mixed with water the two proteins combine and form gluten. Without water, gluten is not formed.
The more the dough is mixed, the more gluten is developed. This causes the dough to become elastic and stretchy, as can be seen in bread dough. The gluten is formed during kneading of the bread dough. Kneading causes the gluten strands to get stronger and longer. However, if too much gluten is formed then the bread dough does not stretch so easily. This will cause the bread to become tough and chewy. Relaxing or resting the dough reduces the elasticity of the dough making it easier to roll out.
Unlike bread dough, pastry dough is only mixed until all the ingredients are combined resulting in less gluten development. However, if there is too little gluten in the pastry dough it will fall apart easily.
Mixing, type of flour, amount of water, and presence of fats are amongst the factors that can affect gluten formation. Fats can prevent gluten development by creating a coating around the proteins (see shortening).
AQA video trascript: Investigating the best type of flour to use in breadmaking