You'll need to breed a Tyranitar with another Pokemon from the same egg group that knows stealth rock.
Here's a list of Pokémon that Tyranitar can breed with.
On this page you can find a list of Pokémon that can learn Stealth Rock.
Note: In Generation 2-5, only male pokémon can pass on egg moves. As of Generation 6, both genders can.