After you win the Wave Badge from Marlon, Hugh asks you to check Route 22 for Team Plasma. Route 22 is northwest from Humilau City.
Explore the Route
Go south from the dock that you walked along to reach Route 22. You'll find Ace Trainer Shel, who has a level 47 Starmie and a level 47 Drapion.
Go up the stairs to the left of the Ace Trainer. Turn on your Dowsing Machine and go north to find a hidden Carbos.
Go down the stairs to the left, then go up the next set of stairs to the left. Here you find Backpacker Myra, who has a level 45 Vanillite and a level 45 Bouffalant.
Go down the stairs to the left of her. In the thick grass you can get a PP Up to the northwest, but the pokéball on the right is actually a level 47 Amoonguss.
Now go south and use the stairs to the left. Terrakion is there! When you approach Terrakion, Colress will walk up to you. Tell him you plan to fight Team Plasma. He gives you the Colress MCHN. He walks away, but mentions that he saw something interesting in the Seaside Cave on Route 21, reminiscent of when you met him on Route 2.
Now that Colress has departed, you can talk to Terrakion to battle it. If you knock Terrakion out, you will still get a chance to catch it, but you have to wait until after you have beaten the game.
I don't recommend using your Master Ball on Terrakion.
Terrakion has a very low catch rate, which means that when you throw pokéballs at it, they have a low chance of succeeding, so you will most likely have to throw a lot of pokéballs at it until you catch it.
You can increase your chance of catching Terrakion by lowering its HP as much as possible. If you have a pokémon with False Swipe, you can use that to lower Terrakion's HP to 1.
Also, Frillish/Jellicent has very good resistances to Terrakion's attacks, so you might want to use one to lower Terrakion's HP.
You can also inflict Poison, Burn, or Paralysis on Terrakion to improve the chance of pokéball success. Better yet, inflict Sleep or Freeze, because these two status ailments improve the chance of success even more than Poison, Burn, or Paralysis.
The type of pokéball most likely to succeed is a Dusk Ball, but only if the battle began between 8PM and 3:59AM. Otherwise, use Ultra Balls.
The maximum chance of pokéball success on Terrakion (that is, if you inflict Sleep or Freeze, lower Terrakion's HP to 1, start the battle between 8PM and 3:59AM and use Dusk Balls) is only about 8%.
There is still more to find in Route 22 even though Colress said to go to Route 21.
Go south from where Terrakion is/was and onto the thin wooden planks. Hop down to get a Rare Candy. Then go farther south to battle Hiker Justin, who has a level 45 Nosepass and a level 45 Steelix.
Go south from the hiker, then onto the wooden planks to the right. Go up, then left onto the grass. Use your Dowsing Machine to find a Green Shard there. Then go to the right on the planks to find a rock that you can push with Strength to give yourself a shortcut. Near the boulder, you find PKMN Breeder Addison, who has a level 45 Camerupt and a level 45 Grumpig. Addison will battle you whenever you leave and then return to this area.
Surf in the water south of the PKMN Breeder. Go south and west, then go onto the grass. Walk as far west as you can go, then pick up the Calcium that is hidden at the end of the path.
Go back over the water to where the PKMN Breeder is. Use the wooden planks to go west, past the hiker in the dark grass. There will be some regular grass to the southwest that you can go into. Go south through this grass, past some stairs, and get the Poison Barb to the south.
Use the stairs on the left, then go a little bit north and go down those stairs. The bottommost item in the grass is a Red Shard. The item just above that is actually a level 47 Amoonguss.
Farther north, there is Backpacker Lowell, who has a level 45 Swinub and a level 45 Darmanitan. The cave entrance to the left of him goes to the Giant Chasm, but you can't do anything in there right now except catch some pokémon that you haven't encountered yet.
In Route 22, go south from the backpacker to find Ace Trainer Lucca, who has a level 47 Arcanine and a level 47 Excadrill. Go up the stairs near her and go straight up on the wooden plank to reach a Max Potion. If you go back onto the wooden plank and use the winding plank path on the left, you can reach a hidden grotto.
Continue to the Next Route
You're done with Route 22 for now, so go back to Humilau City, then continue south to Route 21.