In grammar, agreement occurs when specific parts of a sentence are coordinated: that is, they "shake hands" in number or gender.
There are two forms of agreement: subject-verb agreement and pronoun-antecedent agreement. Subject-verb agreement is pretty rudimentary, so it won't be discussed here. Pronoun-antecedent agreement can be a little more problematic, so...
3.2.1. Pronoun-Antecedent Agreement
A pronoun is a word that is used in place of a noun (for example, I, he, she, it). An antecedent is a word or a phrase to which the pronoun refers.
Once you're comfortable with subject-verb agreement, pronoun- antecedent agreement often follows as a matter of course.
Here is an annotated roundup of pronoun-antecedent rules:
Rule: A singular pronoun refers to a singular antecedent; a plural pronoun refers to a plural antecedent.
Examples:
The CD spins in its caddy. (Singular third-person pronoun its refers to the singular antecedent CD.)
The developers checked their work. (Plural third person pronoun their refers to the plural antecedent developers.)
Rule: When collective nouns are used as antecedents, use singular to plural pronouns, depending on the sentence's meaning.
Examples:
Microsoft seems second to none in its marketing skills (Collective noun "Microsoft" takes a singular pronoun its because the collective noun refers to the group as a whole).
The developers were asked for their preferences (Collective noun "developers" takes the plural pronoun their because the reference is to the individuals of the group).
Use "whom," "who," or "that" to introduce a qualifying phrase when the antecedent is a person. Use "which" when referring to a thing. Use "which" or "that" to introduce a qualifying phrase when the antecedent is a concept or an object. Who, whom, that, and which are known as "relative pronouns."
Use the following as guidelines:
Who = relative pronoun when a person (or persons)is the subject
Whom = relative pronoun when person is not the subject
Which = relative pronoun for things
That = kind of a wildcard; can replace which or who
Examples:
The jewel case, which once held the CD, was broken recently.
The CD that I got for my birthday is defective.
Edward C. Bailey, who wrote "Maximum RPM,"...
The company which published "Maximum RPM" was...
He is the writer whose work includes "Maximum RPM."
This book belongs to whomever purchased it last week.
Who ate all the cereal?
To whom should I address the letter?
The desktop that was designed by Earl is not called GNOME.
The GNOME developers who worked on the desktop are...
The GNOME developers to whom I owe my gratitude are...
Quick tip
To help you choose between who and whom, substitute the person about whom (sorry, couldn't help it) you're talking with either him or he.
If your restatement would contain him, her, them, me, or us, you'll use whom and whomever. "I'm giving the book to him." "To whom am I giving the book?"
If the restatement would contain the word he, she, they, I, or we, you'll use who and whoever. "Do you think he would mind?" "Who do you think would mind?" "She's walking in the door." "Who's walking in the door?"