From the Super Mario Wiki
Invincible Mario is a form that makes its debut in Super Mario Bros.. Mario and Luigi (among others) can assume the form after using a Star, which made its debut in the same game; while in this state, he is resistant to any enemy, and can defeat most of them by simply touching them. However, the state only lasts a few seconds.
While invincible, Mario and Luigi can still die from falling into a pit, lava, or poison water, being crushed, touching Volcano Smog or a Boohemoth, or running out of time. In most games, when Mario is damaged, he will be invulnerable for a few seconds as well.
Invincibility is depicted by a flashing, color-changing character. Since Super Mario Bros. 3, Mario flips when he jumps in this form, in a similar fashion to Samus Aran, who only appears alongside Mario in the Super Smash Bros. series. Since this is not a "true" transformation, Mario can become invincible and retain his current form (for example, if Fire Mario gets a Star, he becomes invincible, but retains his Fire form). Wario can also become invincible and much faster in Wario Land: Super Mario Land 3 by using a Starman as well.
In the Mario Kart series, every driver can become invincible by touching and/or using a Star, allowing them to drive faster and make other drivers spin-out or tumble by touching them.
In Super Mario Bros. 3, Super Mario World, New Super Mario Bros., New Super Mario Bros. Wii, and New Super Mario Bros. 2, there are some ? Blocks that normally contain coins, but will contain Stars if Mario or Luigi is invincible when they strike the block. This allows the player to string together a long period of invincibility.
Starting in Super Mario World, Invincible Mario could get extra lives by defeating eight (five in Super Mario Land 2: 6 Golden Coins and Super Mario 3D Land) or more enemies while invincible, and will keep getting lives for each additional enemy (every eighth enemy in Super Mario 3D World) defeated until the Star wears off completely, and the player becomes vulnerable again. In Wario Land: Super Mario Land 3, Wario gains 11 hearts for each enemy destroyed through physical contact in this state.
In The Super Mario Bros. Super Show!, neither Invincible Mario or Luigi ever made an appearance, as a Starman would not turn Mario or Luigi invincible, but instead served as an alternative to the Fire Flower for becoming "Super Mario" or "Super Luigi". In The Adventures of Super Mario Bros. 3 and Super Mario World, Starmen functioned as they normally did in the games, granting them their invincible forms for a limited time.
Additionally, in the Donkey Kong series, the Kongs can become invincible by breaking through an Invincibility Barrel. While in an invincible form, they gain the same effects as a Super Star, such as flashing and defeating enemies without performing a specific move. They also still lose a life if they fall in a pit, even when invincible.
In Mario & Luigi: Bowser's Inside Story, Bowser Memory M uses a Star to become invincible and attack the Mario Bros., complete with theme music and the effect of knocking a hit bro offscreen for the move's duration.
Names in other languages