From the Super Mario Wiki
Mario holding a flashing Grab Block
Grab Blocks are dark blue Blocks appearing in Super Mario World. As its name implies, the main feature of a Grab Block is that it can be picked up and carried around by the player, essentially the same way as with Super Mario Bros. 3 's Ice Blocks. Once grabbed, it can be kicked away, to defeat enemies or to reach distant ? Blocks.
When Mario or Luigi holds a Grab Block, it will start to flash different colours, disappearing after a few seconds. However, if the player takes a Grab Block through a pipe, then it lasts indefinitely; this is most likely a glitch. Yoshi can eat Grab Blocks when they aren't moving.