From the Super Mario Wiki
Sandmaargh shadows chasing Mario.
Sandmaarghs are enemies introduced in Super Mario 3D Land. They are a variant of Magmaargh that are made of sand instead of lava. They appear in desert themed levels where they will follow Mario or Luigi while hiding under the sand and when they get close enough, they pop out and attempt to bite down on them. If the Sandmaargh fails at biting the player, the Sandmaarghs can be attacked by having the player jump on them or by having the player swing their Tanooki Tail directly at the Sandmaargh. While underground, their shadows can be seen above ground, thus allowing the player to see where they are hidden and watch their movements. Sandmaarghs first appear in World 3-1, they also appear in World 5-1 and Special 6-1.
These sand monsters are set to appear again, after a break of about 5 years, in the upcoming 2016 game Mario & Luigi: Paper Jam for the Nintendo 3DS.