I'm really unsure when to use who vs whom. I can tell when a sentence will sound better with the right one, but I don't know why that is. Can someone please explain it to me?
Who is used when it is the subject of the sentence; whom is used in all other circumstances. Who owns this? is correct. To whom does this belong? is correct.
Topper is correct. Basically, <who> is used when referring to the subject of the sentence and <whom> when referring to the object. For (a lot) more detail, see the below from Wikipedia, which all seems correct to me: Rules for determining who vs. whom in traditional usage Use with prepositions Whom is the form used when prepositions are involved. Again, this is analogous to personal pronouns, for which the objective form is also used after a preposition. For example: To whom have you been talking? (Compare: You have been talking to him.) For whom have you taken these marvellous photographs? (You have taken these marvellous photographs for him.) With whom are you going to the cinema? (You are going to the cinema with him.) He sent gifts to his granddaughter, of whom he was fond. (He sent gifts to his granddaughter; he was fond of her.) He sent gifts to his granddaughter, whom he was fond of. Forms with who in which the preposition does not immediately precede the pronoun are commonly judged acceptable in everyday use, and in spoken use especially: He sent gifts to his granddaughter, who he was fond of. However, this form often violates the rule against ending a sentence with a preposition, so the traditional objective form is preferrable, even in speech. Indirect object with or without to The indirect object is normally formed with to, so is generally just a particular example of the usage with prepositions (to whom). In some situations, whom can also be used by itself to represent the indirect object. However, this is only really used in contexts where the direct object is omitted: Whom will you tell? In fact, the following is normally considered acceptable in everyday use, especially in speech: Who will you tell? Where the direct object is expressed, to is generally included, even where an analogous sentence using a personal pronoun might use the pronoun as the indirect object: You will tell him a story. But: To whom will you tell a story? When the to does not immediately precede the pronoun, either who or whom is generally considered acceptable: Whom will you tell a story to? [Rather formal.] Who will you tell a story to? [Less formal, and more common in fact.] Who(m)(so)ever According to traditional grammar and guides to usage, the relative pronouns who(m)ever and who(m)soever take the case appropriate to their internal clause: Whoever undertakes to set himself up as judge in the field of truth and knowledge is shipwrecked by the laughter of the Gods. (Albert Einstein) Whoever is in the nominative because it is the subject of undertakes in the noun clause whoever undertakes... Similarly: Let whoever is without sin cast the first stone. Whoever is in the nominative because it is the subject of is in the relative clause whoever is without sin (compare: he [or she] is without sin). But in this case whomever is used: Whomever you meet there is bound to be interesting. The accusative form whomever is right, because it is the object of meet (compare: you meet her [or him]), and whomever you meet there is the subject of is in the whole sentence. Usage is variable, however: whomever is often employed and defended where the rules given above would require whoever, just as whom is often used as the subject of a verb in more complex situations (see next section). Subject whom A special problem arises in constructions like this: Beethoven, who you say was a great composer, wrote only one opera. The form given with who is safe, and even beyond reproach (since who is the subject of was). Nevertheless, many use and defend “whom” in such a sentence. The use of whom may arise from confusion with a form like this, in which whom is used according to the standard rules: Beethoven, whom you consider a great composer, wrote only one opera. Here is an example from The Age newspaper (Melbourne, Australia), which in April 1999 syndicated an article from the Washington Post concerning the Columbine massacre: But if others were involved, it was Harris and Klebold whom students said seemed the tightest, who stood apart from the rest of their clique. The Washington Post's original article "correctly" had who students said, but The Age altered this as a matter of house style to whom students said. (The continuation with the parallel construction who stood apart illustrates how The Age style can lead to inconsistencies.) Even the King James Bible has the problematic whom as a subject at least six times, and has been much censured for it: He saith unto them, But whom say ye that I am? (Matthew 16:15; cf. Matthew 16:13, Mark 8:27,29, Luke 9:18,20) (Technically, ye is the subject associated with the verb say in But whom say ye that I am? and I is the subject associated with the verb am. Who[m] is a subject complement, as it would be in Who am I? or I am who? It is not an object complement.) There are similar examples in Shakespeare: Young Ferdinand, whom they suppose is drown'd, [...] (The Tempest, III, 3) [...] going to seek the grave / Of Arthur, whom they say is kill'd to-night / On your suggestion. (King John, IV, 2) Daniel Defoe also uses subject whom, here apparently affected by the proximity of him: They told me that when they were so knocked down, the rest of their company rescued them, and stood over them fighting till they were come to themselves, all but him whom they thought had been dead;[...] (The Further Adventures of Robinson Crusoe, Chapter 6, Part 1) In this case, who[m] is the subject of had been dead.
http://andromeda.rutgers.edu/~jlynch/Writing/w.html jack lynch puts it pretty simply in his 'guide to grammar and style'... everyone should have this site in their 'favorites' imo...