Blocking is a finishing process done after a knit piece has been removed from the needles. When doing patterns that involve many smaller pieces that will be eventually sewn/combined into one final piece, it's often important to have the pieces end up being the same size. But if the gauge of the stitching is different for two pieces (common for beginners getting the feel for how much tension to put on the yarn and needles), they may come out radically different. Lace stitching and delicate fiber knitting will also benefit from blocking to set the patterns.
There are three basic forms of blocking, and which is most appropriate depends on the type of fiber used in the knitting, and end use for the piece. Supplies used in blocking include a board/surface big enough to lay out the knit piece flat on (a bed, floor or table that won't be disturbed is adequate), a towel or sheet to lay between the knit piece and the surface, and an iron, spray bottle, and wet cloth (depending on type of blocking being used). If the surface being used can also be pinned into, rust-resistant pins can be used as well, to hold the knitting in place.
Wet blocking[]
Most useful for man-made fibers, and the most straight forward method of blocking. Wet the knit piece such that it is damp but not dripping. Lay a towel/sheet on your work surface and stretch/shape the knitting such that it holds the desired dimensions on its own (or pin the knitting in place on the surface if your surface permits). Leave the knitting undisturbed until dry. Remove pins if necessary and the knitting should hold its new, appropriate shape naturally.
Steam blocking[]
Useful for cotton and other fibers that can't get fully wet, but can stand heat (NOT good for man-made, synthetic fibers, as heat can cause them to melt and deform). Lay a towel/sheet on your work surface and stretch/shape the knitting such that it holds the desired dimensions on its own (or pin the knitting in place on the surface if your surface permits). Wet a separate piece of cloth to wet but not dripping, and lay it over the knit piece. Run a hot iron over the wet cloth, not pressing down as if to iron, but simply using the heat to vaporize the water and force it down into the knitting. When the top sheet is dry, remove it and the knitting piece; the knitting should hold its new, appropriate shape naturally.
If you have an iron with a 'steam' setting, you can do without the damp cloth over the knitting and hover the iron over the knitting (not actually touching), so the steam permeates it.
Spray blocking[]
The gentlest blocking method, only useful for especially fine fibers and ones that can't stand much heat or water. All other fibers won't get much benefit at all from this method. Lay a towel/sheet on your work surface and stretch/shape the knitting such that it holds the desired dimensions on its own (or pin the knitting in place on the surface if your surface permits). With a spray bottle, gently mist the knitting and let dry. Remove pins if necessary and the knitting should hold its new, appropriate shape naturally.