Native speakers are pronoun experts. We (we is a pronoun here referring to native speakers including yours truly) understand them (them is a pronoun referring to pronouns) easily and employ them (there it is again; it is another pronoun, here referring to the word them) without much need for examination. (A reminder: a pronoun is a word used instead of a noun or noun phrase that has either already been mentioned or does not need to be named specifically.)
Pronoun use is in fact proof of our facility with the language—we so often get them right, and they're not simple things. No one says "Us so often get them right," or "We so seldom get they wrong." But in a particular type of environment, pronoun use can wander from its predicted territory, as writer and humorist James Thurber noted:
I have been planning a piece on personal pronouns and the death of the accusative. Nobody says "I gave it to they," but "me" is almost dead, and I have heard its dying screams from Bermuda to Columbus: "He gave it to Janey and I." ... My cousin Earl Fisher said it to me in Columbus, "Louise and I gave it to he and she last Christmas."
— letter, 25 June 1956
Thurber has a point, and more than half a century later we're still seeing the same kind of thing that bothered him so much. Let's take a closer look at Thurber's objections. In both of the examples he gives, the questionable pronouns are members of a compound phrase—that is, a phrase that has more than one distinct part. In the first it's Janey and I:
He gave it to Janey and I.
What's wrong with this sentence? It might look perfectly fine at first, but if we simplify the compound phrase an odd pronoun choice becomes apparent:
He gave it to Janey. He gave it to I.
The first part works, but "He gave it to I" isn't idiomatic English. After a preposition like to we expect the accusative pronoun me, rather than the nominative pronoun I: "He gave it to me." The same is true after other prepositions as well:
They were with me.
It isn't for me.
It's not about me.
When we rewrite these with compound phrases we get the following:
He gave it to Janey and me.
They were with Janey and me.
It isn't for Janey and me.
It's not about me and Janey.
Note that there's nothing ungrammatical about putting me first, as in the last example; it's simply considered more polite to put oneself in the final position.
Thurber's second example is:
Louise and I gave it to he and she last Christmas.
"Louise and I" is fine, as we see if we separate the first compound phrase:
Louise gave it …; I gave it…
But if we separate the second compound phrase, the pronouns become unidiomatic:
We gave it to he last Christmas. We gave it to she last Christmas.
It's the accusative—him and her in this case—that's called for:
We gave it to him last Christmas. We gave it to her last Christmas.
The accusative is also called for when the pronoun is the object of the verb—that is, when it receives the action of the verb, such as her in "I saw her." Again, things get complicated when the pronoun is part of a compound phrase, as in this reworked version of Thurber's second example:
We gave he and she the book last Christmas.
When we separate the compound phrase, a similar situation arises:
We gave he the book last Christmas. We gave she the book last Christmas.
"We gave he the book" and "we gave she the book" don't sound right; the accusative once again comes to the rescue:
We gave him the book last Christmas. We gave her the book last Christmas.
We won't agree with Thurber that the accusative is dead—phrases like "tell me" and "call him" and "show her" and "hear them" continue to be used with unfettered frequency—but we do agree that compound phrases sometimes make people choose pronouns differently. If you want to keep the Thurber crowd happy, separate the compounds to see which pronoun is the word you're looking for. In speech it may not matter to your audience much of the time, but in writing especially, you'll be judged more favorably if you keep the accusative in its place.
But there's more, of course, to this discussion. If pronoun use is proof of facility with the language, why do so many competent users of English confuse them in compound phrases?
One common theory is that people choose I instead of me in cases like "He gave it to Janey and I" because they've been taught that me isn't correct in cases like "It is me" and "My friend and me agree"; they assume, so the theory goes, that there's something wrong with me, especially when joined to someone else by and, and so they use I instead. It's a reasonable enough theory—and maybe it holds true for some people—but it doesn't explain the matter entirely because our evidence of [someone] and I in the object position goes back to the 16th century, about 150 years before anyone was instructing anyone else about these things.
Another theory has the added bonus of dealing also with the likes of "Louise gave it to he and she." It's from linguist Noam Chomsky, who, in his 1986 book Barriers, proposes that compound phrases like you and I and he and she are barriers to the assignment of grammatical case, meaning that their elements don't get assigned case individually, but that the phrase as a whole is what gets assigned case instead; the individual words in the phrase can look like they're in the object or subject position, or are even reflexive, i.e. myself, herself, or themselves.