First a simple explanation, then if that fails (which it usually does), a mnemonic trick.
"Who" always refers to a sentence's subject. "Whom" always refers to its object.
Got it? No? OK. Let's do "who" first.
Bob went down the street.
Omit the "Bob," and see whether "He" or "Him" would be appropriate.
In this case, it'd be "He went down the street." Bob is the subject.
Bob is the person WHO went down the street.
Still with me? Fantastic! Let's cover "whom" next.
Hortense loves Bob.
For that 'un, it'd be "Hortense loves him." Bob is the object of Hortense, as well as of her much-desired love and legendary skills at oral pleasure.
Only a minute more here....
The person WHOM Hortense loves is Bob.
What's the trick?
If when you rephrase the sentence and it's "he" or "she," then it's "who." They all end in vowels. He...she...who.
If it's "hiM" or "her," then it's "whoM." They all end in consonants. Him...her...whom. Follow the magical "M."
(I tend to remember going over this with the class a couple years ago on an ancient thread, but not even I care to search for it. I remain, as always, happy to help our nation with grammar.)