Your cover letter should be tailored to the type of job you're applying for. Avoid sending a single cover letter (or a slightly-modified cover letter) to every potential employer: rewrite it, rethink it and redo it for every application.
Some rules of thumb for all cases:
1) Shorter is better. Under no circumstances should an entry-level cover letter exceed a single page, and in most cases it should not exceed three paragraphs.
2) Be plain in format. Use plain fonts (Time New Roman, Georgia, etc.), all materials (other than portfolio stuff) should be black ink on white paper, and do not use clipart of any kind on your resume or cover letter. You want to be remembered as "The Guy Who Wrote The Really Really Good Cover Letter", not as "The Guy Who Put Screen Beans--Seriously, Screen Beans, Can You Even Imagine?--In His Resume".
3) Submit your package in a plain envelope or (if you're sending a lot of documents or portfolio materials) an accordion file. No staples, no report covers, no document covers, none of that: just a plain envelope. Binder clips and paperclips are acceptable if you want to keep materials together or in a sequence.
4) Avoid using "Dear Sir/Madam" or "To Whom It May Concern". If you don't know who will be reading your letter, call and ask. If multiple people will be reading your letter, then either address it to the most senior person, or to "Dear Committee".
5) Use a tone appropriate for the letter's recipient, but err on the side of being overly-formal. (You're much more likely to offend a formal employer with a casual letter than you are to offend a casual employer with a formal letter.)
6) Have someone else read over your letter, ideally someone who works or has previously worked for the person or company you're applying for. The internet can be a useful resource for readers, but the closer the reader is to your job, the more likely their feedback will be useful.
7) If you are applying by e-mail, make sure and send your files in the specified formats. If no formats are specified, assume that .PDF and .DOC files will be accepted. (And when sending .DOC files, you might want to save them as XP/Office 2000 files rather than as Vista/Windows 7 files, just to be sure they can be opened on the other end.)
8) If you are not applying by e-mail, and you can do so, deliver your package in person. It lets them see your face, it sends a message about your enthusiasm and interest, and you can be absolutely sure that your package makes it onto the right person's desk, while more paperwork is lost in the mail or garbled on the internet than you'd care to know about.
Oh, and one other thing: save your cover letters and resumes. They take up almost no space on your hard drive, and if you've already put some thought into your resume and cover letter for each job, they're going to be an incredible help if you land an interview, since you already know what they're looking for and how your skills and experience align with it. One of the best ways to spend that 5-10 minutes sitting while waiting to be interviewed is to review the cover letter and resume you submitted for the job so you know how much they know about you, what you haven't yet mentioned, and so on.