In the Pokémon games, Pokerus can only be obtained by battling or trading with an infected Pokémon. Once a Pokémon has Pokerus, it will remain infected until it levels up, at which point it will no longer be infected and the Pokérus status will be removed. Pokérus cannot be cured or reversed in the games, and there is no way to inoculate a Pokémon against it.
It's important to note that Pokérus is entirely fictional and does not exist in the real world. It is purely a game mechanic in the Pokémon video game series.