From the Super Mario Wiki, the Mario encyclopedia
A Yoshi Platform is a flat rectangular prism created when Yoshi sprays his juice on enemies (such as Boos and Cheep-Cheeps) from Super Mario Sunshine. It is the color of the Yoshi spitting the juice, and it moves according to its color. Pink platforms move vertically upward, purple ones move horizontally, and orange platforms stay where they are until they disappear. Pink Boos can make a Yoshi Platform when sprayed with F.L.U.D.D., not just Juice. Mario and Yoshi can use the platforms to get to faraway areas. They are mainly used in the episodes "Yoshi's Fruit Adventure" in Ricco Harbor and "The Hotel Lobby's Secret" in Sirena Beach.
Two enemies, Pink Boos and Cheep-Cheeps, always revert to their regular appearance. Some enemies, such as the Cataquack, are instantly defeated when reverting from their platform form to their regular form. Other enemies, such as the giant Strollin' Stu and Sleepy Boos, are completely immune to Yoshi's juice and therefore cannot become a platform.