We had an exercise on Subject and Object pronouns in school. I have a question on the same. Can we use them and they interchangeably? Like in the following instance:
It's them over there.
They did it.
Is this usage appropriate?
NO! You are not allowed to use the terms interchangeably. The way I think about it is as follows.
Subject Pronouns "They" = are the "doers" of an action. In a sentence, "they" would be the noun that performs the verb.
EXAMPLE 1: Bill and Ted were really hungry. They ate all the cakes in the pantry.
Object Pronouns "Them" = are the "receivers" of an action. In a sentence, "them" would be the noun's experiences or receives the verb
EXAMPLE 2: I brought some cakes to the party. I'll put them in the pantry.
Notice that in the example 1 Bill and Ted are performing an action (eating). In example 2 the cakes are being acted upon (placed in a pantry).
In your sample sentence of:
It's them over there. They did it.
You are using the terms correctly and nothing is wrong. "them" is being acted upon (It's = It is, in which case the "it" is the noun performing the action of is), while "they" is used as the performer of an action (in this case "did").
The incorrect version of example would read like this...
It's they over there. Them did it.