Within the Wild Area, trainers can participate in the Rotom Rally by speaking with certain staff members. The Rotom Rally is a single person race that goes from Place A to Place B, and if done quick enough, you will receive a higher score that could land you certain rewards. By speaking with these staff members, you can choose to do a Rotom Rally to go from one staff member to another. These courses have various Rotom Balloons dotted around that will help your trainer stay on the path. The White Balloons will give you a Speed Boost, while the Red Balloons will give you an extra 15 Seconds to complete the course. You can't interact with Pokemon during a Rotom Rally, but they will slow you down if you collide with one.
The first time you complete a Rotom Rally, you will earn TM14. If you do 11 Rotom Rallies, you will earn a Fast Ball. And if you score 20,000 Points or higher during any Rotom Rally, you will earn TM80.
We have questions and answers related to this topic which may also help you: