Some volcanoes erupt all of the time because the lava continually boils out of the magma chamber.
But others appear to do nothing for a long time (they are called dormant volcanoes) and then suddenly explode, often without warning.
The difference is caused by the type of material in the magma chamber and just how sticky it is.