From the Super Mario Wiki
Magical Potions, also called Magic Potions or simply Potions, are items that Mario and his friends discover in the land of Subcon during the events of Super Mario Bros. 2. They replaced the Magic Lamps from Yume Kōjō: Doki Doki Panic.
Super Mario series
Super Mario Bros. 2
In Super Mario Bros. 2, when picked up and thrown to the ground, a Magical Potion allows Mario and friends to enter Subspace, where they can find coins (under untouched grass tufts) and Mushrooms. Also, within Subspace, certain jars will act like a Warp Zone, allowing Mario to warp to a later World. In Super Mario Advance, after finishing the game, one can find Yoshi Eggs during the Yoshi Challenge.
BS Super Mario USA
The Super Mario Bros. Super Show!
In The Super Mario Bros. Super Show!, King Koopa sometimes pulls out a Magical Potion at the end of an episode, usually when he is outmatched by Mario's group, in episodes such as "Bad Rap" and "Mario Meets Koop-zilla" and throws it, creating a Warp Zone for him to escape. The episode "Princess, I Shrunk the Mario Brothers" introduces two types of potions called the Magic Shrink Potion and Magic Growing Potion.
Toad has also used the Magical Potion in a fight with Wart. He enters the door the potion creates and then gives powerups to aid Mario, Luigi, and Yoshi during the fight, including Super Leaves, P-Wings, and Frog Suits.
Nintendo Adventure Books
In Doors to Doom, when Mario and Luigi escape a stampede of Ninjis by jumping off a cliff while using a parasol to safely float down, they decide to escape by revealing a bottle of Magic Potion from a tuft of grass. However, this particular bottle of potion creates a door which has a lock displaying a shoelace puzzle on it. Mario and Luigi must solve the puzzle and push the correct button in order to escape the area; pushing the incorrect button makes the door lead them to an encounter where they get shot point-blank by a Shy Guy riding an Autobomb, leading to a Game Over.
Super Mario Bros. 2
Names in other languages