This article is from the misc.writing Writing FAQ, by Wendy Chatley Green firstname.lastname@example.org with numerous contributions by others.
A query letter sells your article, novel, short
story, or other work to an agent or editor. You send a
query letter to get a request to write a piece or to save
you (and the editor or agent) the expense and hassle of
dealing with a manuscript that isn't wanted.
Query letters are sales tools. If you're trying for
an assignment, then the letter tells how and why you will do
an excellent job for the editor. If you're trying to place
a completed manuscript with a publisher or agent, then the
letter describes the book and your worth as an author.
Queries bypass the slush pile. Once an editor or
agent responds favorably to a query, then the article (or
book) goes straight to that editor or agent. Your cover
letter (see whatever section number I give cover letters)
reminds the recipient of your query and response.
Queries may be formal business letters or e-mail.
When you research the market and the publications before
writing your query, make very certain that the editor wants
e-mail before sending any.
Some people tremble at the thought of selling
themselves or their work. Don't think of queries in that
light. What you are doing is stating facts about yourself
and about your novel or article.
Also, if you are pitching a novel--finish it first.
No one wants to get excited about a book that isn't ready
for publication--and no, they won't wait for you to finish