Whether you sew every day or every once in a while, cleaning your sewing machine on a regular basis is a must. Most minor problems can actually be fixed by cleaning! I use my machine almost every day, so I clean it once a week. That might seem like a lot, but if you saw all the lint and thread I pull out of it every week you would understand. If you don't use your machine a lot, just clean it our after each use, then it will be ready for next time.
First, remove all spools and bobbins. Oh, unplug it as well, to prevent those finger-sewing accidents! Then wipe the outside of your machine from top to bottom. Open all the parts that you can and brush the lint out of them with the little brush that probably came with your machine. Tweezers are also handy for pulling out those rogue threads. Some people use a can of compressed air to remove the lint, but it's not necessary. If you have an older machine, you need to oil all of the moving parts. While you've got your machine all opened up, look for loose screws. I have one trouble screw that will unscrew itself every so often and it would be quite terrible if it fell out!
If your machine is really gunked up, you may want to tie a few knots in a piece of string, dip it in rubbing alcohol and pull it between the tension discs to clean them. I use this technique on my serger, and it works very well.
Change your needle! Yes, it makes a huge difference! Dull needles lead to skipped stitches, puckered seams, and mad frustration.
Once you get in the habit of cleaning you sewing machine on a regular basis, your sewing will go much more smoothly.