All you have to do is to defeat the 3 Magikoopas to pass the stage and obtain the green star. Note that their positions change everytime you kill one if you jump on them.
The easiest way to beat this stage is to go in with Fire Flower ability. Your fireballs can easily take them out at a distance. In addition, they do not change positions when you kill them with fire balls.