whom is placed in a case replaced by possessive pronouns such as him or her and vice versa in who is placed when we replace it with she or he
For example :
Ahmed went to the club (Who went to the club?)
Ahmed went to the club with her (with whom did Ahmed go to the club?)