The player can do this by scolding them if they don't want them to do something that is bad, e.g., destroying furniture, or by praising them to encourage a behavior. In The Sims 2: Pets, cats also must be trained so they can live with Sims.
A cat in Create-a-Pet for The Sims 2: Pets.