Who refers to the subject of a verb or preposition within a clause; whom refers to the object of a verb or preposition within a clause. Thus Who is that man? Where is the man whom you seek? Where is the man who seeks you? The two terms are most easily confused when the pronoun acts as a subject within one clause but refers to an object in another clause: In the second example above, the man is the subject of the first clause, Where is the man, but the object in the second clause, whom you seek, thus requiring the objective whom.
Whom has an unfortunate reputation for being old-fashioned. While this may hold true in certain colloquial settings, using whom correctly is not nearly as stilted, pedantic, or incorrect as some may have you think. Use the correct forms in their correct contexts in written English. I’ve also noticed a habit of lazy speakers misusing whom for who, which has the aural pleasure of snobbish befuddlement. If you are uncertain whether to write who or whom, whoever or whomever, whosoever or whomsoever, always choose the subjective pronoun over the objective pronoun. It’s better to be incorrect and casual than incorrect and falsely arrogant.