From the Super Mario Wiki
Flip Cards is a Bonus Challenge in Super Mario World 2: Yoshi's Island, Yoshi's Island: Super Mario Advance 3 and Yoshi's Island DS. It is the minigame of World 1 and is said to be the simplest of all the minigames in the Yoshi's Island game. In the minigame, there are nine cards known as Flip Cards facing down. The player can choose which one they want to flip over, and when the player chooses which one they want to flip, Yoshi will toss a Yoshi Egg at the card and flip it over. If Yoshi can get everything without getting Kamek, then he'll receive everything that he has earned, and Kamek will fly away. He'll flip the remaining panel, which gives Yoshi a 10-Up card to collect. Sometimes a "win" is not possible due to two Kamek cards being on the board, in which case the player will have to stop the game to retain the items.
The cards each have a picture of something and each picture does something different. If Yoshi gets a Toady, then nothing will happen. If the Yoshi gets an item, such as a star or watermelon, the Yoshi will receive that item (this however only happens in Super Mario World 2: Yoshi's Island). Yoshi can also gain extra lives. However, getting a Kamek ends the game and all bonuses canceled.
In Yoshi's Island DS, the player couldn't get any items, and the panels were replaced by Flowers and heads of the Babies. All cards provide the same bonus of one life. After one card is flipped over, Yoshi can continue flipping cards and getting the 1-Ups until Yoshi gets Kamek. Flipping over a Toady gives the player nothing, but flipping over Kamek causes the minigame to end, as well as cancel any bonuses received. Yoshi can earn a 14-Up if successful.