The first step in garment making, and possibly the most important step of all, is making the gauge swatch. The gauge swatch is basically just a square piece of knitted fabric that demonstrates how you, the needles and the yarn interact before you get going on the main project. All patterns give a recommended gauge, or stitches and rows per inch, at the beginning of their instructions, usually directly below the suggestions for yarn weight and needle size.
In order to make the gauge swatch, gather up the exact yarn and needles that you plan to use for your project (even small differences like yarn color and needle brand can affect your gauge!). Cast on a number of stitches that will give you at least four inches across, and then work in stockinette stitch or the specified stitch pattern until you have made a bit more than four vertical inches of fabric.
Once you get as close as possible to the recommended gauge, go ahead and start knitting your garment, but don't forget about gauge altogether just yet. Sometimes the gauge of your swatch may differ from the gauge that results when you cast on all of the stitches required for your garment. After you've worked about 5"/12cm of the first piece of your project, recheck your gauge by laying the piece down on a flat surface and pulling out your tape measure (or stitch gauge) again. Your knitting should be just as close to the recommended gauge as it was before, but in the event that it's not, you'll have to unravel what you've done and start again using a different needle size. As you rip out the rows and roll the yarn back into a ball, know two things: one, that you’ll be glad you did when your sweater fits, and two, that you have our condolences.