Every level hides a snail and a hole. Kick the snail into the hole and you are on the right track.
Two audio cues give it away. Drop into the hole near the start of a level and the music changes. Pass through a door that is not the beehive one and you will hear a different tune again. If the music you are hearing is the plain overworld theme, you are not in a bonus level and should back out.
Once you are genuinely inside, finish what the level asks and the new pair of pants is yours.