From the Super Mario Wiki
Yoshi Blocks are special blocks that appear in Super Mario World 2: Yoshi's Island, Yoshi's Island: Super Mario Advance 3 and Yoshi's Island DS. These blocks have a picture of a Yoshi face on them. The color of the Yoshi face will match the color of the Yoshi that needs to touch the block. When a Yoshi transforms into a vehicle using a Morph Bubble, the player has a limited amount of time to reach the Yoshi Block in order to advance in the stage. Upon touching the block, the Yoshi will return back to normal, as well as be reunited with Baby Mario (or the other babies) and his or her supply of Yoshi Eggs. If the transformed Yoshi does not reach the block within the Time Limit, the Yoshi is automatically returned to the original spot of the Morph Bubble, forcing the Yoshi to attempt to reach the Yoshi Block again.