People use the word "query" to refer to two slightly different things. Let's go through a few descriptions:
Query Package - This is the package of material you send to an agent (or publisher) to ask them if they would be interested in representing (or publishing) you. Sometimes people will refer to this package as just a "query." The package could include a number of things, from just a one-page letter to letter, synopsis, and manuscript pages.
Query Letter - This is the business letter you send to the agent (or publisher) which tells a little about you and your work. The letter could be sent all by itself, or it could be a cover letter within a larger query package that includes other items. Sometimes people will refer to this letter as just a "query." The query letter is a sales tool, and ideally will persuasively describe to the agent why your book and you are deserving of immediate attention. Typically, the query letter will give your book's title, genre, and wordcount; a quick sketch of the main character, plot, and conflict; and a little about the author.
Synopsis - This is a summary of the story and characters contained in your book, simplified down to fit into (usually) one to five pages. The summary will typically be much more detailed than what you would include in the query letter, although not nearly so detailed as the entire manuscript. It is usually sent as part of a query package, although an agent may request one in response to a query, or not request one at all.
I suggest a look at the "Query Letters and Synopses" forum in SYW, for reasons which will be obvious once you go there.