How do they function differently?
Them
Them is used to refer to the object of a clause. Usually represents the group of people or things that have ‘experienced’ the action described by the verb, and refers back to two or more people or things that were mentioned earlier. Them can be used as both a direct object pronoun, or an indirect object pronoun. Them is also sometimes used instead of the object pronouns him or her to refer to an individual person whose sex is not known or mentioned.
Those
Those can act as either a pronoun or an adjective. Those is a plural pronoun, it refers to or replaces plural nouns