Who and whom are interrogative pronouns. Many people live their lives without using WHOM at all, thinking that whom should be used in formal situations only. If you want to speak English properly, then you need to know about usage of both WHO and WHOM.
The rule is:
WHO is used in the subject position in a sentence:
Who bought you that ring?
WHOM is used in the object position:
The man whom you invited to dinner.
We also use WHOM after prepositions:
For whom the bell tolls.
To whom you want to talk?
How can you tell whether to use WHO or WHOM? It’s simple! If your pronoun can be replaced with ’he’ or ’she’, then use WHO. If it can be replaced with ’him’ or ’her’ or any other object pronoun, then use WHOM.
Who took my pen? (He/she took my pen – subject)
Whom is the book about? (About him – object)