Used instead of “who” as the object of a verb or preposition.

whom did he marry?

used to introduce a clause giving further information about a person or people previously mentioned.

Joan Fontaine plays the mouse who married the playboy

okay dh kalau tk faham cakap okay!
Who means siapa
whom means untuk siapa

who is your best friend?

that book for whom?

siapa kawan baik kamu?

buku itu untuk siapa?