A query is kind of what it sounds like -- you're ASKING an agent or publisher if they're interested in seeing your book. But a query is more than hey what's up I'm awesome my book is awesome look at it plz! You have to write a professional letter that will entice the person who will read it into writing back with a HECK YES SHOW ME YOUR BOOK! (Okay, they probably won't say it like that. But you get the gist.)
The first line in your query should be:
Dear Ms./Mr. AgentLastName OR Dear Ms/Mr. EditorLastName
This might sound obvious, but you never EVER want to address a query with Dear Sirs/Madams or To Whom it May Concern. You also don't want to address it to the publisher or the agency. You are writing a specific agent or a specific editor, whom you've taken the time to research. You know what this person likes and you think he or she will like your book. So address them personally.
The next lines should should look something like:
I'm writing to see if you'd be interested in my novel/memoir/biography/etc [Awesome Title]. Awesome Title is the story of [Thing that Happens] when [Interesting Character] does [Thing] and [Enticing Shenanigans].
Okay, so that sounds like totally gobbledygook. So let's pretend we're writing a query for J.K. Rowling.
I'm writing in hopes of piquing your interest in my novel HARRY POTTER AND THE PHILOSOPHER'S STONE. It's the story of an orphan who finds out that is he a wizard, only to be whisked off to a magical school where he quickly discovers that it is up to him and his new friends to save all of wizardry.
That's the HOOK. A one to two sentence summary of your book. If you're having trouble figuring out your hook, whoops, it's time to go back and make sure your book has one!
You can also think of hooks as what the movie-trailer-voice-over-guy would say if your book was a movie. So, like, Supernatural would be "In a world where ghosts and demons terrorize the good people of middle America, it's up to two brothers from Kansas to keep the terror at bay -- if they could only get along."
So you've got your hook. What's next?
In the next paragraph, you have a brief synopsis. EMPHASIS ON THE WORD BRIEF. As in specific and concise. Imagine what would go on the back of your book/inside flap of the jacket. Put that here.
EXCEPT, and here's the tricky part, you want the spoilers in. So when on the back of Harry Potter it doesn't say "when it turns out that Voldemort is actually hiding under some shifty professor's turban, Harry and his friends totally kick all the ass the end" ...well, you have to do that for your mini-synopsis.
I'm not going to write you a whole mini-synopsis of Frozen or The Vampires Diaries pilot or anything. You're welcome. That would be so tl;dr. But you should know your book well enough to summarize it and then cut it down to about 400-500 words. GODSPEED.
The Sign Off:
The last paragraph of your query letter should be short and sweet, and it should include the following things:
1. Some info regarding how you found the agent and why you're querying him or her. For example, maybe you read the agency's blog and saw that this particular agent was looking for Valley Girl Vampire Steampunk. You write valley girl vampire steampunk. And you were all like, hey, I should query this agent. In this case, you could write "I saw on your blog that you were looking for valley girl vampire steampunk, and I think my book fits this bill." Or maybe you saw that they represent a few favorite authors of yours who write in a similar style or genre. You might say "I really love the work by your client Awesome Author and I admire your work with Fabulous Author."
2. A thanks for his or her time. You can also say that you look forward to hearing back.
3. Peace out. And by peace out, I mean sign with something like "Sincerely, Your Name." Business style.
WHEN YOU GET REJECTED:
Now, I'm not saying you didn't write a masterpiece. I don't know you, and I don't know your work. But you WILL GET REJECTED. That's the nature of the industry. The only proper response to a rejection is a thank you. And, even then, agents' and editors' inboxes are so overfull that you should really only write back if they've sent you personal notes. Which is rare. So if you get a personal rejection, feel GOOD!
Definitely do not write back asking why they rejected you, demanding that they read again, generally raging at the agent or editor for being stupid/nearsighted/mean, or saying anything along the lines of "you're going to regret this when I'm a billionaire!" Just no. You can feel that way, but that doesn't mean it's appropriate to send rage emails.
A lot of rejection comes down to taste. That said, if you get a lot of rejections that say the same thing, it might be time to get revising or even to move on to the next project.
PS: Why do I want an agent?
So, I realize, you might not know what exactly an agent is or does. An agent is someone who works as a kind of liaison between author and publisher. Many publishers don't accept submissions unless they come through an agent. So, yes, if you want to be published with a larger publisher, or even some of the smaller publishers, you will need an agent. And some of you might be wondering things like "but don't I have to pay an agent?" or "what if I can't afford an agent?" Here's the thing: the agent doesn't get paid unless you do. Any agent who charges you up front for services is running a scam or is just too green to be working. The way an agent gets paid is by selling an author's book -- which often takes a lot of work on the agent's part, which could be anything from working on additional revisions with an author to meetings with publishers to negotiating contract terms -- and then taking a cut. Industry standard, at least in North America, is 15%. So. That's the short version on agents.
Leave 'em below. I'll do my best to answer anything I can!