Whether those or them should be used depends on the context.
This/these and that/those are called demonstratives, from a Latin word meaning "point".† When you use them you are pointing emphatically to a particular object or set of objects, typically to distinguish that object or set from similar objects in the environment.
For instance, if a salesclerk shows you three shirts you might say "I like that one", indicating that you like one shirt better than the other two.
The "environment" also incudes the discourse context: what has been said previously. If you have not yet mentioned anything which might be confused with the object you are talking about, there is no need for a demonstrative, and you use the ordinary personal pronoun.
Yesterday was my birthday, and Sarah and I went out for dinner. After dinner she gave me chocolates, but I didn't like them.
But if it is possible that your reader or hearer will misunderstand what them refers to, or if you want to make it clear that you are distinguishing its object from other objects in the discourse, you use a demonstrative.
Yesterday was my birthday. Kevin gave me a flash drive, and Brad gave me a sweater. Sarah gave me chocolates, but I didn't like those.
Using those distinguishes the chocolates and implies that you did like the other gifts.
† Araucaria uses the term deictic, which means basically the same thing; it comes from the Greek word for "point" rather than the Latin.