We use the word which when we want to talk about the subject of a sentence. We use whom when we speak about the object of the verb. Who and when are the class of “wh-word,” frequently used to ask questions or establish a clause in a sentence?
The main object of using these words is to know about people or a person rather than things. Who is used to describe which person, the one who does the action, who is an objective pronoun? It can be used to communicate which person you are addressing or to add a clause that provides some more information about the person discussed. It can also be used to ask the name of a person or group of people. Whom is to add relative clauses in the sentence and add further information.