We use "who" when the person is the subject:
"He's the man who sold me the book on eBay."
We use "whose" to refer to something belonging to the person:
"He's the man whose book I bought".
We use "whom" when the person is the object, particularly following a preposition:
"He's the man from whom I bought the book."
This last sentence is very formal. In everyday English, we use a more informal construction where we put the preposition at the end of the sentence and omit the relative pronoun ( this omission sounds wrong to speakers of other languages, but it's actually perfectly acceptable) :
" He's the man I bought the book from".
Because we can omit relative pronouns referring to the object of a sentence, we rarely use "whom" in everyday English, and very rarely use it in conversation.