From the Super Mario Wiki
A Kamikaze Koopa is a type of Koopa Troopa within a Flashing Shell found only in Super Mario World. It is created when a yellow Beach Koopa climbs into an empty Koopa Shell of any color, including its own after being ejected from it. It becomes nearly invincible in its Flashing Shell, thus becoming a Kamikaze Koopa. After its transformation, the Kamikaze Koopa attempts to hit Mario or Luigi by spinning around in its shell and dashing towards them. It becomes impossible to separate the Beach Koopa from the shell.
Jumping on a Kamikaze Koopa causes the Mario Bros. to bounce upwards, but does not damage the shell. They can only be defeated with a Yoshi, a Spin Jump or a Super Star. If any Yoshi eats one, it obtains all three shell abilities (causing small earthquakes, flying, and spitting out fire) as long as the shell remains in its mouth.
After beating the Special Zone (or completing all 96 exits in Super Mario Advance 2), all Koopa Troopa and Koopa Paratroopa shells become Mario masks. Kamikaze Koopas thus become spinning, flashing Mario masks.