From the Super Mario Wiki
Retrieved from "http://www.mariowiki.com/index.php?title=Enemy_Course&oldid=2097497"
The Enemy Courses (also known as Enemy Battles) are a type of battle course found in New Super Mario Bros. Wii and New Super Mario Bros. U. They are similar to the Hammer Bro battles from Super Mario Bros. 3, even sporting a remix of the Hammer Bros. theme. Enemy Blockades in Super Mario 3D World work in a similar fashion to Enemy Courses.
New Super Mario Bros. Wii
An Enemy Course is found in all worlds except for World 9 in New Super Mario Bros. Wii. The player needs to collect eight Toad Balloons, while enemies attack them, to release a treasure chest that contains a Toad in it. Once all balloons are collected, the Toad thanks the player for rescuing him and will give the player three Super Mushrooms. This course is played at some points of the Map where an enemy is found. In Worlds 6 and 8, the player can do their Enemy Course infinite times. The enemies do not need to be defeated, and are automatically defeated when the game is won. The players cannot quit these courses, so in order to get back to the World Map the player has to complete the course or lose a life. However, if the player loses a life, they will be knocked back to the space where they were on the World Map.
Losing a life in any level will cause enemies to reappear on the map. Using a Super Star when on the map and running into one of the enemies will immediately dispatch them without having to enter these courses, but the player will not receive three Super Mushrooms for doing so.
New Super Mario Bros. U/New Super Luigi U
While being absent in New Super Mario Bros. 2, Enemy Courses return in New Super Mario Bros. U and New Super Luigi U, there are 7 Enemy Courses this time around. Unlike the courses in New Super Mario Bros. Wii, the enemies must be defeated in order to retrieve the prize, which is a Super Star this time around instead of three Super Mushrooms given by Toad, but if the player doesn't open the chest for a long moment, Nabbit will jump out of nowhere and steal the chest's contents. In New Super Luigi U, the prize is either a Propeller Mushroom or a Mini Mushroom. If the enemy cannot be defeated by normal stomps, such as Boos, a winged ? Block floats by which carries a Super Star for Mario and co. to use.