Vesuvius is near a place where one section of the Earth's surface is being pushed down below another section. These sections are called plates.
Volcanoes begin to form when the rocks of the lower plate get pushed deep into the Earth.
There they are heated, until they melt, forming magma, one kind of liquid rock. Because magma is less dense than the solid rock around it, it is pushed upward. If this magma finds a weak place at the Earth's surface, it may break through and form a volcano.