From the Super Mario Wiki
Invincible Mario is a form Mario and Luigi assumes after using a Star. In this state, which only lasts for a few seconds, he is resistant to any enemy. Additionally, he is able to defeat most of them by simply touching them. However, he 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. Invincible Mario, just like the Star, made its first appearance in Super Mario Bros.. Invincibility is depicted by a flashing, and, in later games, also color-changing character. Since Super Mario Bros. 3, Mario now 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 really a transformation, Mario can become invincible and retain his current form (For example, if he is Fire Mario and gets a Star, he becomes invincible, but he is still in Fire form.). Wario can also become invincible, and also much faster, in Wario Land: Super Mario Land 3 by using a Starman as well. In most games, when Mario is damaged, he will be invulnerable for a few seconds as well.
In the Mario Kart series, every driver could 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 the 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.
Names in other languages