To keep Pokemon away, you can give your lead pokemon a Cleanse Tag, which will prevent pokemon below your lead's level from appearing. You can find it in Icarris City (in white). What Hashkif said is also true.
To plain old escape, you can have a pokemon with the ability Run Away. You also could use a smoke ball (found in Castillia City in white). Another escame method could be to use the move Whirlwind.