"Who" is the subject of a sentence.
"Who is that?" -> who=subject; that=object
"Whom" is the object of a sentence
"Whom shall I give this to?" -> whom=object; I=subject
The easiest way to remember which word to use is by answering the who question with the correct personal pronoun.
example: question- "Who/whom did I speak to yesterday?"
answer- would you say "You spoke to he"?. Of course not! It would be, "You spoke to him".
If the answer to the who question is me, him, her, them, or us, you should say whom
"Whom did I speak to yesterday?" is correct. It could also be written as, "To whom did I speak yesterday?"
other example: question- "Who/whom is your English tutor?"
answer- would you respond, "He is my teacher", or "Him is my teacher"? If you guessed "he", great job!
If the answer to the question is I, he, she, they, or we, you should use who.
"Who is my English teacher?" is correct.
Remember, if the word who is associated with a preposition (to whom, for whom, with whom, from whom, etc.) whom should be used.
A few other examples:
To whom do I give this letter?
Who is fastest man on Earth?
Whom do you work for?
Who is next in line?
I will be kind to whomever is kind to me
Whoever thought this would have happened?