The personal pronoun whom confuses many people. What is it for?
Simply put, who is a subject pronoun and whom is an object pronoun. Specifically, whom is the object of either a verb or a preposition:
The principal gave whom a medal?
To whom were you talking?
As with I and me, there is a simple test you can do to check which one you need. Try substitute “him/her” and “he/she” and see what that sounds like. For example, in the above example you could say “The principal gave him a medal.” That’s because “him/her” are object pronouns, and function in the same way as whom. By contrast, “he/she” are subject pronouns, and are similar to who.
In daily speech we often use who instead of whom, and it may happen that even in writing whom will one day disappear from use. For the time being, though, you’ll want to know what whom is for. That way you won’t make any embarrassing mistakes.