Whom is formal English and is used instead of "who" when the sentence is referring to an object pronoun and not when the sentence is referring to a subject pronoun such as he or she.(pronoun)
An example of whom is someone asking which person someone is speaking to, "To whom are you speaking?"
See whom in Webster's New World College Dictionary
Origin: ME < OE hwam, dat. of hwa, who
See whom in American Heritage Dictionary 4
Learn more about whom