This short guide from Smith College lists out some of the questions you might want to address in a cover letter. This is a good resource if you need some prompts to help you get started.
This guide includes a step by step walk through of one style of cover letter format, tips on editing and proofreading, and advice for how to target your cover letter toward the jobs you want. Spoiler alert! Use keywords from the job posting in order to get noticed.
Check out this article from The Muse, an online career platform, to see examples of good cover letters, get tips on formatting, and learn why you ought to write a cover letter.