You have to be lucky. Pokerus is found on wild Pokemon, and there's a chance as small as finding shiny to get infected from battling that wild Pokemon. So this is what I suggest: always defeat wild Pokemon if you don't want to catch it
Rainbow Latias has right, you should catch or defeat the wild pokemon in order to get pokerus, it is very rare. I heard that wild Yanma in FR/LG can bring it to you more than other wild pokemons.
Well, they are random, the only way to get it is to fight the pokemon. If your pokemon does catch PoKeRuS, in their status menu it should have the icon saying "PKRS". Very useful, but hard to find indeed.