In a sentence, WHO and WHOM have different syntactic functions.
Explanation:
WHO
WHO can be used as the subject of a sentence. For example, "who is your brother?"
WHO can be replaced by he or she.
WHOM
WHOM is used as the object of the verb or object of a preposition as in "who is helping whom?" or "I know the person to whom the letter was addressed" respectively.