A great cover letter will be able to help you capture the attention of a potential employer, even if you feel as though your resume is a bit on the weak side. These are some helpful tips for having the best possible cover letter:
1. Always introduce yourself to the person who is in charge of hiring. If you know the person's name, be sure to put it in the cover letter to add a personal touch.
2. Describe all of the areas that fall in line with the reasons why you are a great fit for the job that you are applying for. This is a great time to sell yourself to help you get to the next step of a potential interview.
3. Work on further explanations of areas of your resume that may not have been described. This is a good place to detail why there were any lapses in employment, why you may have left a certain position, etc.
4. Explain some of the other aspects of your resume that may have not been touched upon. 
You are always going to find that there are plenty of interesting aspects of a cover letter that most people may forget about. This is a great time to elaborate on any of your skills, what your aspirations are (where you would like to be in 10 years, etc.), what you may have for certifications, training courses and more.
While you are writing your cover letter, you want to dance along the fine line of selling yourself as an employee and treating it as an initial interview. The more care that you put into the cover letter, as well as your resume, the better the chance you will have of making your way to the next round. 
This video is packed with great information on writing a cover letter:
 - https://resumegenius.com/resume/cover-letters-the-how-to-guide
 - http://jobsearch.about.com/od/resumes/a/resumetoc.htm