Who is a subject. Whom, on the other hand, is an object.
An important rule is to use he/him method to know which one is correct!
He = Who
Him = Whom
Look at the following example:
Who/Whom sent the mail?
-He sent the letter. So, in this case, who is the correct one!
Who/Whom should I choose for my basketball team?
-Should I choose him? So, in this case, whom is the correct one!
Now let’s look at a slightly difficult sentence.
We guessed who/whom the book was about.
There are two clauses here. However, the second clause contains the who/whom. The book was about him. So, in this case, whom is correct!