Whom is used as an object pronoun in a sentence. It refers to the object of a verb or preposition, for ex:
To whom did the medal deliver?
Ali saw whom on his way?
Whom is used as a direct object, for ex:
You talk to whom?
Whom is also used as indirect object, for ex:
You gave whom a medal?
Whom is also used as a relative clause to link one clause to another, for ex:
The medal was given to the player, whom be loved by all the audience.