Who is the SUBJECT. The subject performs the action:
▶️ Who ate the last piece of pizza?
who = subject
ate = verb
▶️ The students who failed the test will need extra help.
the students / who = subject
failed = verb
Whom is the OBJECT. The object receives the action:
▶️ Bob gave the money to whom?
Bob = subject
gave = verb
money = direct object
whom = indirect object
Whom is always used after a PREPOSITION.
▶️ My three brothers, one of whom is a doctor, live in New York.
(of = preposition)
▶️ With whom did you go to the movies?
(with = preposition)
▶️ That’s the employee at whom I yelled.
(at = preposition)
▶️ I no longer speak to the person from whom I got this gift.
(from = preposition)
BIG EXCEPTION IN SPOKEN ENGLISH!
In spoken English, we often use “who” not “whom,” and end sentences with
prepositions… even when it is technically incorrect:
▶️ Who did Bob give the money to?
▶️ Who did you go to the movies with?
▶️ That’s the employee who I yelled at.
▶️ I no longer speak to the person who I got this gift from.