One type of eruption happens very suddenly because the magma is not thick. It is almost like pancake batter and comes out of the Earth quite fast and full of glass. This lava cools and forms a rock that is full of tiny holes. This rock is called pumice. A piece of pumice will float on water because it contains so many air pockets.
Pumice also cools so fast that within a few hours it looks like glass.
When thicker magmas are erupted, the gas pressure breaks up the rock into fragments. These rock fragments are called pyroclasts. When the lava cools, it is called pyroclastic rock. The quieter type of eruptions of very fluid lava comes from dikes, which are underground tubes of lava that usually go in a sideways direction from the volcano, tunneling through the layers of rock that are already there. When there are many dikes in one area, they are called dike swarms.