When a volcano erupts underwater the lava flow will cool into large billowy balls of rock; these formations are called pillow lava or lava pillows. These are very common all over the world, as all of the Earth's surface either is now or was at one point covered by water. Many parts of Earth's current land masses were more recently covered by ice sheets and glaciers, which quickly melt into water when a volcano appears under them.

Pillow lava forms when slower-forming lava hits water, and a hard crust quickly forms over the end of the lava flow. As more lava comes down the line, it forces the lava shell to crack, and more lava spills out of the cracks, only to crust over and form new bulbs of lava. These shells crack in turn, exuding more lava bulbs. This progressive crusting and cracking prevents the lava from forming a solid lava sheet, and instead you get a big pile of lava bulbs, called a pillow flow.

Lava pillows are generally solid rock, not bubbles. They tend to be about half a meter to a couple meters in diameter, and may be either nearly spherical or elongated, depending on rate of flow. Some look more like frozen flows of ooze than pillows. They are often formed with lineations on their surface, where the emerging lava scraped against the edges of the crack.

More violent underwater eruptions tend to spew out the magma with enough force to form separate lava balls (called bombs) or ash, so no lava flow forms. When lava interacts with shallow water, steam explosions may cause it to form hyaloclastite, rock made from a mish-mash of lava and obsidian fragments. That pretty much covers underwater eruptions, but up on dry land we have pahoehoe lava flows, which may resemble pillow lava to some extent, with their smooth, undulating flow.