To rest (or to relax) is used in various contexts:

  1. Resting your meat after cooking is a crucial, but often overlooked step. During the cooking, the muscles contract and if you cut into the meat without leaving it to relax, the juices will ooze out resulting in a dry dish. If the muscles get a chance to relax, the juices redistribute through out the meat giving you a juicy steak or roast.
  2.  Resting the pastry before baking, so the gluten, which may have been stretched during lining of the pastry case, gets a chance to relax and contract. This should prevent shrinking in the oven.
  3. Batters (like pancake or Yorkshire pudding) often benefit from resting, to give the starch cells a chance to swell up, resulting in a lighter finished product.