Who is normally used as the subject of a sentence.
- Who called you?
- Who is coming?
- Who wrote this article?
Whom is traditionally used as the object.
- Whom did you invite?
- To whom should I send the letter?
- Whom did she meet?
The simple test
If you could answer with he/she/they, use who.
If you could answer with him/her/them, use whom.
In everyday modern English, particularly informal speech, who is often used instead of whom.