Once you collect all the 8 badges after successfully defeat 8 Pokemon trainers from different towns then you can able to join the Pokemon League championship.
You can collect badges by visiting different towns and challenge the trainers of that town, after winning the challenge you will get one badge but you need a total of 8 badges to join Pokemon League so you can find other trainers from different towns.