From the Super Mario Wiki
Retrieved from "https://www.mariowiki.com/index.php?title=Whirlpool&oldid=2415461"
In Super Mario RPG: Legend of the Seven Stars, Whirlpools appear in almost every underwater area. When Mario is sucked by one, he is taken to the bottom of the water, where the player can reach other areas. This is because Mario cannot dive underwater on his own. However, Mario cannot resurface by touching a Whirlpool.
A Whirlpool appeared in Super Mario 64 and its remake, in Dire, Dire Docks. It appeared in the middle of the first area, and if Mario or others go near it, they will possibly be sucked in and will be defeated instantly.
In New Super Mario Bros., Whirlpools appear only in World 6-5. If Mario gets trapped into one, the player must repeatedly press the A button to avoid being sucked down, or else they will lose a life. After a while, the Whirlpool will disappear, and Mario can pass by. However, one Whirlpool allows Mario access to a Star Coin.