From the Super Mario Wiki
The Sweatmore Hotpants are protective clothing found in Wario: Master of Disguise. They are contained within a purple treasure chest near the beginning of Sweatmore Peak in Episode 7. Wearing them allows Wario to travel through the magma without taking damage. However, the standard Hotpants are limited and do not protect him from the more intense magma found deeper in the volcano, which requires the Sweatmore Superhotpants. In Special Episode Part 4, the basic Hotpants do not appear due to the Superhotpants being found much earlier in the area, making the basic Hotpants unnecessary.
If Wario is attacked by a Snackeral, he will lose the Sweatmore Hotpants and start taking damage while he is submerged in the magma. If Wario has both kinds of Hotpants, the Snackeral will only steal his regular Hotpants. If Wario loses the basic Hotpants, a nearby red chest will turn into a purple one containing a replacement for them, even if he still has the Superhotpants.