In the first Jurassic Park film, T-Rex is first seen when Grant and the group are touring Isla Nublar. It attacks the jeeps, and eats Donald Gennaro, the lawyer.
It also appears several other times; one of these is the end, when it saves the group by killing the Velociraptors (who were in fact the true villains).
T-Rex returns as the secondary villain in The Lost World: Jurassic Park. The team on Isla Sorna find a baby T-Rex in this film, with the adult searching for it. Once again, it kills the true villain (in this case, Peter Ludlow, who was trying to capture the dinosaurs).
Finally in Jurassic Park III, the group finds a T-Rex feeding on a Parasaurolophus when they crash-land on Isla Sorna. However, a Spinosaurus shows up, and, in a battle, manages to kill the T-Rex. Because of the fact that T-Rex was killed, this film got the lowest rating from Jurassic Park fans. Some fans, however, enjoyed the new antagonist.