Here is an interesting list of some of the most controversial rules in English Grammar. The last one, namely "who" vs "whom", is probably the one of more difficult ones, so let's explore what belongs here.
"Who" is used as a subject of the sentence, whereas "whom" is used as the
object of a verb or preposition. For short, Who = Subject and Whom = Object. Compare:
1. 1. Who would like to go on vacation?
2. 2. Whom would you like to go with?
3. 3. Who played this game?
4. 4. I do not know who I will play next but I have time to recover.
5. 5. To whom was this parcel addressed?
6. 6. Whom do you trust?
7. 7. I do not know whom to trust.
8. 8. Who wants dinner?
9. 9. Whom did you hit?
10. 10. To whom are you speaking?
11. 11. To whom it may concern.
12. 12. Whom are you talking about?
If you're not sure, use this rule: If the word can be replaced with "he"
or "she", then use who. If it can be replaced with “him” or “her,” then
use whom. For example, "she would like to go next" makes more sense than
"her would like to go next". Similarly, "are you apeaking to her" makes
sense, and "are you speaking to she" does not.
Somewhat more advanced examples are explored in this article. Do check
out the link if you are not sure why these two sentences are correct: "He
is the man who they believe is Sir Newton" and "He is the man whom they
believe to be Sir Newton".
Finally, keep in mind that the word “whom” is becoming archaic, and fewer
and fewer people use it every year. Consequently, there is nothing wrong
with “Who are you talking to?” and many other examples above in the
context of conversational English.