Dear [Name of Editor],
my name is [Your Name], I'm [your age] old and work as [your job] in [your town]. I have [never published anything before / published the following stories and novels:]
- Title of Short Story, Anthology, Year, Number
- Title of Novel, Year, Publisher
Enclosed you will find [the first draft / treatment and first 50 pages / whatever] of my novel "[Title of Novel]". I would love to publish my novel in [your house], because the topic of my novel, which is [your topic], perfectly complements [your publishing program with this author and that author and their books X and Y].
Since this seems not as obvious to some as I thought it would be: Do some careful research on the publisher you are sending your manuscript to. Do not write "your house" or "your publishing program", but the name of that publisher and the name or a description (other authors) that your novels fits in to. Replace all other placeholders, too (your name, name of editor, your age, your job, your town etc.). And don't just copy/paste this text. It is an example. I'll spell the basics out:
- introduce yourself; give all the details that may be relevant to the publication of your text (if you, the author, are an interesting person, that may help sell your book, so let the publisher know that you scaled Mount Everest, worked in a jail, or are only 12 years old)
- give your publishing history; if you have published nothing yet, say so (omit this only if your name is Stephen King)
- state why you chose this specific publisher; why does your book fit them; why do they fit you
- make sure you have the name of the right editor and address the letter to him or her personally; if necessary, call the reception and ask
- include a stamped, self-addressed envelope, or a postcard where they can tick "we are not interested" or "call me at ...."; make a reply easy and free for them
The basic idea is: treat this similar to a job application. (Research job application, if you have no idea how to write a letter applying for a job, I was taking it for granted that you all know how to apply for jobs and wouldn't write "your house".)
Hope this makes my answer a bit more clear, folks.
Here is a how-to by a literary agent that tells you what they expect. It's surprisingly similar to what I wrote above: http://www.dystel.com/submission-requirements/
Contrary to popular belief, we like our unsolicited queries to be concise, well-written and well-proofed, and as devoid of gimmicks as possible. Tell us who you are (past writing credits or celebrity status is helpful to know about but not mandatory), what your project is (a summary paragraph is good), and whether you have submitted this project to the entire publishing community already.
In order to get your foot in the door remember that appearances count. We don’t like to see handwritten queries with coffee stains on them. We don’t like our names misspelled. We don’t like a lot of typos in general. We don’t like generic “Dear Agent” letters, but we don’t like overly chummy greetings, either. Photographs generally don’t help – unless you’re George Clooney. Plain and simple works best for us. Don’t try to convince us that you’ve written the next GONE WITH THE WIND… we’ve heard that one before. Let your project speak for itself.
Enclose a cover letter, outline or brief synopsis of the work (with word count if possible), a sample chapter, and a stamped, self-addressed envelope for our response. Please type all of your correspondence and double space everything other than the cover letter. E-mail queries are fine, but keep them brief and make sure your cover letter is in the body of the e-mail. We won’t open attachments if they come with a blank e-mail. Please be sure to query only one agent at this agency. We will not review queries sent to more than one of us.
There's more valuable advice from them on their "Queries" page: http://www.dystel.com/category/queries/