A cover letter is a way to briefly introduce yourself, let the person you are writing to know that you are interested in them, and what position you would like. The main idea is to be as short and right to the point as possible.
Obviously, when it comes to explaining yourself, you want to include schooling, skills that pertain to the job, and a very brief work history that pertains to the job you want.
You also want to write which position you want, and why you are a great candidate for it.
Finally, you want to wow your reader by telling them some knowledge about their company. Perhaps you know they are the industry leader in doing a certain thing. Whatever you write, you just want to make them aware that you know about their company, and you WANT to work for them.

