This is tricky, but once you know the rule it seems much less complicated.

Who or whom is usually used in a question, for example:

Who goes there?

The rule:

If the answer to the question can be "he" (or she); use who. If the answer can be "her" (or him); use whom. For instance:

Who goes there?

He does.


For whom does the bell toll?

It tolls for her


Check out the grammar and spelling assistance metanode.