Who
Who is a word that replaces the subject pronoun (he/she/we/they). Therefore, use who when you don’t know the identity or gender of the subject of the sentence – the person performing the action of the verb. As an example:
‘Who punched Fred in the face?’
‘Who (subject pronoun) punched (verb) Fred (object) in the face?’
If you can replace who with he/she/we/they, then ‘who’ is correct (assuming you knew the identity of the assailant).
- Who paid for the drinks?
- He/she/we/they paid for the drinks.
NOT – Him/her/them paid for the drinks. (As these are all object pronouns and suffer the action of the verb.)
Whom
Whom, on the other hand, is the object pronoun (used instead of him/her/them) of the sentence (because you don’t know the identity or gender of the object of the sentence). For example:
“Fred punched whom in the face?”
Somewhat confusingly, you will notice that whom is still a pronoun but in this case it stands in for Object not the subject of the sentence. In other words, use whom when it is receiving the action of the sentence (object).
Libertad tip:
If you don’t know who you are going to call, it is technically correct to say, “whom shall I call?” But in modern English, both British and American, it is more common to say “who should I call?”
Summary:
If you can rewrite the sentence with him/her/them, then you can use whom. If, on the other hand, you can only rewrite the sentence with he/she/we/they then use who.