A year ago, aside from the vague notion it was some kind of cover letter you included with a novel submission, I had no idea what a query letter was. For the uninitiated, a query letter must include a really short synopsis of your novel's main plot arc with regards to its main protagonist. It's supposed to address the following questions.
1. Who is your main character or protagonist?
2. What does he or she want?
3. What stands in his or her way and must he or she do to surmount these obstacles.
4. What happens if he or she fails?
Easy peasy, right? Well, um, no. At least not always. First of all, there's the issue of deciding who your actual plot-driving protagonist is. Sometimes that's not hard. But what if there are many point of view characters, and they all have roughly equal point of view time? The answer is to find the character who actually drives the plot. If you've really written something with multiple story threads (akin to George RR Martin's Game of Thrones), most people suggest picking a single character, the one with the most interesting and compelling sub plot, and focus on him or her.
The second question can be tough as well, because characters usually have many wants, often competing. And those wants can change as the story progresses. With some stories, elucidating which of a protagonist's competing and ever-evolving wants is the overarching one can be harder than it seems.
The third question can be hard too. Often there are multiple obstacles and multiple things the protagonist must do to overcome them. You don't want to simply toss a laundry list out there. Again, it comes to boiling things down to the most important obstacle and the most important thing(s) the hero must do. A common mistake is for the query writer to assume it's obvious. "Well of course he's got to find the sword of awesomeness so he can kill the evil wizard and fulfill the prophecy." It's easy to get so close to your work and the common tropes of your that you forget that the agent reading your query might not "know" that in your world, evil wizards are not killable by mundane things like slips in the tub or poisoned wine.
Finally, what happens if she or he fails? This also may seem implicit. The evil wizard won't die and life will continue to suck for everyone. But wait! Life has sucked for everyone for a long time already. Why is it so critical that this protagonist succeed at this time?
The good thing about writing a query (or a longer plot synopsis for that matter) is it can help you see some of the weaknesses in your story--those things you're too darned close to to notice most of the time. It can also help you clarify for yourself what the central plot of your story is. Many people suggest trying to write a query well before your novel finished for this reason. It may alert you to a problem.
Once the major points are in place, the thing probably isn't done. First of all, all the points must be connected in a logical manner. You don't want to get bogged down in details but you don't want to be vague either. Not easy.
Then you have to have some voice in the thing. Getting my character's and novel's voice into my query has been an Achilles heel for me. When writing non fiction, I tend to slip into a sort of academic writing mode where I want to cram as much information into each sentence as possible. This results in a bunch of grammatically correct sentences that fail to capture any sense of how my novel's actually written.
But you don't want to err in the direction of trying to be too cute or clever either. There are some examples of writers who have done this and caught an agent's eye. But more likely, you will simply annoy a person who has 200 more of these things to get through before she even goes into the office.
And once you think you have something sharp in place, you need to solicit feedback (and get some from people who aren't familiar with your novel). For this, you must gird your loins, because the fur will fly. You'll quite possibly have to start over from scratch--or gut the thing down to its bare bones. It's frustrating, but necessary. I always find myself trying to explain things to the people who just aren't seeing what my story's about from the query. Problem is, you won't be able to provide the agents with notes.
And no matter how frustrated you get, don't forget to thank the people who take time to read and comment on the thing. Even if you think they're way off base or if their opinions contradict one another (and sometimes they will). As a rule, the people who provide feedback are trying to be helpful.
The final layer of query writing frustration is that there's a lot of conflicting advice out there about it. Some of it is simply out of date (anything more than 5 or so years old is particularly suspect, as technology and conventions evolve rapidly. Also, some things simply go in and out of style. A query that caught an agent's eye ten or more years ago might be dragged straight to the delete folder today.
And never forget that agents are individuals. They all have different tastes. Some of them put the specifics they want on their sites, though many don't. But if agent A says he wants a one paragraph, 100 word query synopsis as the core of your letter, he probably means it, even if Query Shark says queries can be up to 250 words long and that multiple, short paragraphs are better than single long paragraphs.
Since I am still very much a newb at this, I'll toss in some links to some sites that have been especially helpful in learning about queries and what they entail. When writing a query letter, it's important to check a particular agent's guidelines (or blog if one is available) to see what he or she specifically likes and dislikes in a query.
A great site where an agent named Janet Reid rips queries readers have sent her to shreds--all to get them revised to the point where she'd want to start reading the associated manuscript. It's very illuminating, and often funny.
An online writers' community that has a share your work forum that includes a "Query Letter Hell." You'll have to create an account to view the share your work forum and you must post at least 50 times in their forums before you can submit something there for critiquing. But reading (and commenting on) other peoples' work can be very helpful.
An author and agent who has a website that addresses many things of interest to a writer, including query and synopsis writing.
This one says to include a one-sentence hook or logline, which is considered by some to be dated advice. But some of the information in this guideline is still valid, if taken in the context of other things you've read about query writing.
Contains a list of agent blogs that discuss query writing.
If anyone reading this has any other favorite query advice sites, please let me know