The objective form of “who” used in direct or indirect questions to refer to the person or people receiving an action.
Whom did you invite to the ceremony?
The objective form of “who” introducing a relative clause referring to a person or people who are the object of a verb or preposition within that clause.
The colleague to whom I sent the report will respond tomorrow.
Introduces a nominal clause in indirect questions to indicate a choice between a limited set of options (nominal clause).
I don't know whom to trust anymore.
whopronoun
Used to introduce a clause giving further information about a person or people previously mentioned.
The teacher, who was very kind, helped me with my homework.
Used to ask about the identity of a person or people.
Who is coming to the party tonight?
Used alone as a question requesting the identity of a person or people, often expressing surprise or seeking clarification.
“Someone just knocked at the door.” — “Who?”
Used in indirect questions to refer to the identity of a person or people.