The words “who” and “whom” are both pronouns but people often get confused on when to use which one.
In order to know whether to use “who” or “whom,” it is important to discuss difference between subjects and objects because you use “who” when you are referring to the subject of a clause and “whom” when you are referring to the object of a clause.
Subject and object sound pretty abstract, but can be easier to understand if using specific people in an example. The subject of the sentence is the person doing something, and the object of the sentence is having something done to them. For example:
Janet accidentally stepped on John’s foot. In this example Janet is the subject and John is the object.
So remember, you use “whom” when you are referring to the object of a sentence. Use “who” when you are referring to the subject of a sentence.
If you are still unsure, here is a little trick to use to help you remember. Like “whom,” the pronoun “him” ends with “m.” When you’re trying to decide whether to use “who” or “whom,” ask yourself if the answer to the question would be “he” or “him.” So that is the trick: if you can’t remember that you use “whom” when you are referring to the object of the sentence, just remember that “him” equals “whom.”