Krakatoa was a stratovolcano, and it formed by ejecting matter in a manner typical of other stratovolcanoes. According to Oregon State University, stratovolcanoes are sometimes referred to as cinder cones in reference to the manner in which they are built up.
A stratovolcano differs from a shield volcano in that, while a shield volcano is built up by the outpouring of viscid lava, cinder cones form from the accretion of cinders and ash ejected during more explosive events. This debris piles up to form a steep-sided, conical mountain. Stratovolcanoes are prone to explosive detonation, as happened to Krakatoa in 1883, for example.