This one may seem hard at first, but isn’t all that difficult to figure out. Probably the biggest problem is people who think that using “whom” sounds more elegant and sophisticated than simply using “who.” Not good, and not accurate. The two words are not interchangeable.
Think of it as the difference between using “he” and “him.” If someone is doing the action, we would say “he” is doing it. (We’d never say “him” is doing it, though we still have intelligent people sounding less so by saying “Him and I are doing….”) So if the action is being done BY someone, we’d say “who.”
For those who remember the distinction from English class, “who” is used when it’s the subject, and “whom” is used when the person is the object of some action. So anything before the verb has to be “who.”
These are correct:
Who is that woman?
Who is coming to the party?
Who did that?
Who shall I say is calling?
Still keeping “he” and “him” in mind, when something is being done for someone, or to them, or with them, we would say it’s being done to “him.” In the same way, when something is being done by, for, or to someone we don’t know, we’d say “whom.”
These are correct:
To whom do we give the note? (Or, We give the note to whom?)
Whom should I vote for in the next election season? (There is no good answer to this question, BTW.)
The home improvement company whom you recommended hasn’t returned my calls. (Of course, many people simply drop the “whom” these days in such a sentence.)
Whom do you prefer? In this case, “you” is the main subject, “prefer” is the main verb, and “whom” is the object of your preference. You could just as easily have said, “You prefer whom?”
“For Whom the Bell Tolls” (Thank you, Ernest.)
The distinction between the two words may well disappear in the near future. But for now, it still exists, and figuring out which to use is a good exercise for the brain.