The most common reason for holes in the knitting is inadvertently wrapping the yarn over the needle when you aren't forming a stitch. This is known as a yarn over and is used deliberately in lace patterns and other patterns to make decorative holes and increase the number of stitches in a piece of knitting.
It's not very attractive, however, when you aren't doing it on purpose. Yarn overs will also give you more stitches to work with, which could mess up your pattern and will certainly make your work progressively wider.
This commonly happens when switching between knits and purls in the same row. Remember to always move the yarn from the front to the back between the stitches, rather than by wrapping it around the needle.
If accidental yarn overs are a consistent problem for you, count the number of stitches on your needle every few rows. If youve got more than you started with, odds are you slipped in a yarn over at some point.
Holes can also be used for decorative purpose in knitting by playing with the gauge of a yarn--and another reason you might have holes is because you are using a larger needle than you should for the pattern. For instance, yarn can be knit on larger needles than normal to make an open fabric, like in the pattern for the Trendestter Capelet. This is a fun effect, and using yarn on different sized needles is a great way to learn about yarn.