Blocking is the step that turns a lumpy pile of stitches into a garment. You get the knit wet, lay it flat, push it to the measurements printed on your pattern, and let it dry in that shape. The fibres relax, the fabric evens out, and a lot of what looked like bad knitting turns out to have been a sweater that had never been blocked.
Before you run any water, check what the yarn is made of. Wool, alpaca, mohair, cotton and linen all take a wet soak like the one below. Acrylic does not. Acrylic is plastic, and a soak does nothing to it at all. Acrylic gets steam instead: hover a steamer or an iron above the surface and let the heat relax the stitches without touching the fabric. Push that heat too far and the fibre goes limp and drapey for good, which knitters call killing the acrylic. Some people do it on purpose for a floppy shawl. It cannot be undone, so test a swatch before you aim a steamer at a finished sweater.
The walkthrough below follows Davina of Sheep & Stitch blocking a grey raglan. Her sweater is a useful example because it is a whole garment rather than a swatch, and the numbers she chases are the finished measurements on her printed pattern. Those numbers live on the schematic drawing, which is the little line diagram on a knitting pattern that most people skip over.
Block after you have bound off and woven in your ends, never before. A soak sets those woven tails into the fabric around them, which is half of what keeps them from working loose. Crochet gets the same treatment with a couple of differences worth reading first, and those are in blocking crochet.