English Additional language speakers often have difficulty to decide which of the above words should be used. I trust that the following explanation and examples will help to clarify the difference.
Who is a subject pronoun and should be used to replace the subject of the verb.
I cannot see who is driving the car. ( He/she is driving the car.)
Who has left the back door open again?
Whom is an object pronoun and should be used to replace the object of a verb, or to follow a preposition.
Whom did you see? ( Did you see him?)
To whom did you send the e-mail?
A simple test is to see whether you can replace the who/whom with a subject pronoun ( I or he), or an object pronoun ( me or him)
I hope you will find this short explanation very helpful.