A cover letter accompanying a submission to a journal or magazine can be short and simple. Indicate that you're submitting the work for consideration, but don't say much—if anything—about the work. In these kinds of submissions, you include the story, essay or poems along with the cover letter. So, let the creative work speak for itself. You might indicate why you chose to send this particular piece to this particular publication. This demonstrates your knowledge of the publication and your mindfulness in submitting. Also, include biographical information. Select a few relevant details that highlight your accomplishments. You might mention where you studied creative writing, where your creative work has been published or any awards or accolades you've received. If you have no credits, don't worry. While accolades certainly build confidence in your abilities, the real focus is in the writing itself. In fact, many journals are hungry to introduce a great new writer by publishing a debut story.
Don't forget to read writers' guidelines closely. Some journals have a strong preference as to how you address your submissions. If the guidelines do not stipulate this, look up the appropriate editor on the journal's masthead and direct your submission to that person.
Here's an example of how a cover letter accompanying an electronic submission might read for a writer with few credits:
Dear Ms. Reynolds,
Submitted for your consideration is “The Misfits of Greenwood," a short story. HaHa Magazine is a publication that values humor, an element I hope you enjoy in this story.
I have studied creative writing as an undergraduate at Fancy University and at Continuing Education Workshop, where my fiction won the New Writer's Award.
Thank you for your consideration.
I kept this one very short and simple. You can, of course, include more. Still, don't feel compelled to write something lengthy. The bulk of the attention will—and should—rest on the creative work that accompanies the cover letter. Some editors will use cover letters to decide what gets read faster, but there's no way to anticipate how each editor approaches this. One editor might give special attention to submissions that list previous publications in certain journals. Another editor might also take a quicker look at submissions that come from writers who went to her own beloved alma mater.
Be honest and keep the tone professional and friendly. This suggests respect—for your own writing and the work and time of the editors.