If you bake a lot of bread, you've almost certainly come across directions to fold the dough. In times past, bread recipes instructed you to punch down the dough after it had fermented, though now bakers are generally directed to "deflate" the dough. Folding accomplishes the same goals as deflating, but with some added benefits.
Folding is a technique that's more often used with wetter, or more hydrated, bread doughs, as well as doughs that have been underdeveloped for some reason or other. Doing this procedure does two things: it redistributes air/gasses and evens out temperature, and it aligns/develops the gluten structure. Deflating only accomplishes the redistribution element of folding, but that's really all that's needed for less hydrated doughs. Folding is always used as part of the fermentation stage. Generally, you'll proof the dough for an hour (first rise), fold it, then let it proof (rise) for another hour or so. An under-developed, wet dough can be fermented for many hours with multiple folds.
Now that's artisan bread.
To fold, first flour your work surface fairly well. Turn your dough out onto it and pat out most of the gas. I like to work left to right, top to bottom, but use whatever directions work for you as long as you hit all points of the compass. Take the first side, stretch it out and fold it onto the middle of the dough. Repeat this for the opposing side, then do the same thing to the top and bottom. To finish, get you hands under the dough and turn it over so that the smooth side is on top. Then put it back into whatever proofing container you're using and let the dough finish proofing. Check out the gallery below for images matching the directions.