"Who" is used as the subject of a verb. It answers the question "who does what?"
"Whom" is used as the object of a verb or preposition. It answers the question "to/for whom?"
Examples:
* Who is going to the party? (Subject)
* Whom did you see at the store? (Object of the verb "see")
* To whom are you talking? (Object of the preposition "to")
In informal English, "who" is often used in place of "whom," even in object positions. However, this is considered grammatically incorrect in formal writing and speaking.
Here's a helpful mnemonic:
* Who = He
* Whom = Him
If you can substitute "he" or "him" in a sentence, you can use "who" or "whom" respectively.
Therefore, it's important to use "who" and "whom" correctly to ensure grammatically accurate written English.