Lava

Lava is an element found exclusively in the fanon series of Pikmin. There are two types of lava. Shallow lava burns Pikmin when they touch it, but Red Pikmin can pass unharmed. Deep lava is similar to acid because it takes the form of a liquid, and that it causes Pikmin to die instantly. However, even Red Pikmin die when they touch deep lava.

Some enemies also utilize shallow lava as a weapon, for instance, the Clown Around squirts jets of lava from the flower on its chest. Some enemies also use lava as a defense mechanism, like the Lava Goolix, which is composed of the molten goo. Red Pikmin generally should be used against lava-wielding enemies.

In Pikmin: Connection of the Worlds
Replacing the shallow/deep lava in this game is the temperature. Above ground, lava is generally not so hot, as it's loosing heat but is still hot enough to incinerate most Pikmin. Over time, however, a surface will start to build up over the lava, turing it into a lava tunnel. Brown Pikmin, unfortunately, will pick away at this layer of rock if either left idle or if swarmed. Should that happen, call them back ASAP. Underground, the lava is called magma as it has not reached the surface yet and is hotter. This is because the magma is closer to the mantle. It is more runny than lava. In certain cave, the magma can be seen seeping through some cracks but still poses a threat to your Pikmin. Red Pikmin are not resistant as lava/magma is way hotter than fire, the Pikmin that is resistant to it, however, belongs to the Burgundy Pikmin. Any other Pikmin will die from it; but Red Pikmin, if they manage to get in the lava, it will not kill them instantly like the other Pikmin. Instead, they will "swim" in the superheated semi-liquid rock, but won't last long. If whistled at, they will attempt to "swim" back to you.