I'm guessing you're referring to these:
Yeah... you have to use the Acro Bike.
>The Acro Bike has got an increased speed over running, but it's not incredibly fast. Instead, it is used in order to move through various obstacles. Using the Acro Bike, you can, on certain bridges, press B and a direction to hop across adjacent bridges. In addition to that, you can do wheelies when you hold the B Button while moving.
>If you hold the B Button while stationary, you will start bouncing. This allows you to move up and down specific ledges. These are sometimes necessary to reach certain items in a variety of areas.
Source: Serebii and Experience.