Trapping more and more gases inside the magma of the volcano, it's just waiting to erupt
Krakatoa is a composite volcano (or stratovolcano). Composite volcanoes generally are tall and have steep sides. They are made up of layers of pyroclastic materials (broken rock fragments released by violent eruptions) and layers of lava. Eruptions from these types of volcanoes are less frequently but are very violent when they do erupt.
The Krakatoa volcano contains rhyolitic lava inside it. This type of lava is very explosive. Rhyolitic lava (as well as other types of lava, dacitic and andesitic) contains a high amount of quartz and feldspar minerals. It has a very high content of silica in it as well as a high viscosity (more resistance to flow). The reason this lava type is very explosive is because the magma inside traps many gases within it. The gases cannot escape very easily inside the volcano, which causes pressure to build up over time, so when it reaches the surface, all the built up pressure releases the gases locked inside resulting in very loud and dangerous eruptions. Since this volcano contains rhyolitic lava, Krakatoa, most likely, was made up of rhyolite.
Krakatoa itself was formed when magma rose up to the surface, cooling and hardening from its exposure to air. The magma chamber underneath the volcano was experiencing pressure from the melting of rocks inside it. That pressure built up magma and gases until the magma was forced to intrude upwards through the layers of crust around it. In the end, that movement skyward created Krakatoa.
Krakatoa is located on the convergent plate boundary of two plates: the Indo-Australian tectonic plate and the Eurasian tectonic plate. The reason volcanic activity can occur is because the Indo-Australian tectonic plate is going through the process of subduction (moving under the Eurasian tectonic plate since it's denser) as it travels upwards/northwards to mainland Asia.
Krakatoa is located on the convergent plate boundary of two plates: the Indo-Australian tectonic plate and the Eurasian tectonic plate. The reason volcanic activity can occur is because the Indo-Australian tectonic plate is going through the process of subduction (moving under the Eurasian tectonic plate since it's denser) as it travels upwards/northwards to mainland Asia.