From the Super Mario Wiki
Ads keep the MarioWiki independent and free :)
Mystery Houses are a series of courses introduced in Super Mario 3D World that involve a marathon of Mystery Boxes for Green Stars. In these courses, the player is under a ten-second time limit to complete an objective, such as defeating every enemy or reaching the Green Star. These courses are available from the start, but Enemy Blockades or general map environments could make them inaccessible. These courses are available on every even-numbered world, including World Bowser, World Mushroom, and World Crown.