From the Super Mario Wiki
A Train Bandit is a chalk Shy Guy etched onto certain walls in the game Super Mario World 2: Yoshi's Island and its remake Yoshi's Island: Super Mario Advance 3. When Yoshi has transformed into the Train, Train Bandits come to life and chase after him. They are limited to the walls borders and stop moving when Yoshi returns to his normal state. There is no way to defeat a Train Bandit, except by smashing a POW Block when they are on-screen (only in the Game Boy Advance version, in Go! Go! Morphing!).
Names in other languages