Volcanoes are formed through the movement of magma and tectonic plates. Magma either pushes up through the middle of a lithosphere plate or around the boundaries of two plates, forming a volcano.
When magma is produced around plate boundaries, it is called interplate volcanic activity. This activity is caused by unusually hot mantle material forming in the lower mantle and pushing up into the upper mantle. The mantle material then forms a plume shape and wells up to create a hot spot under a specific part of the Earth's surface. Due to the unusual amount of heat within the mantle material, it melts and forms magma that is just under the Earth's crust.
The hot spot, where the magma spews forth, remains stationary, but as the continental plates move over the spot, the magma will begin creating strings of volcanoes. These volcanoes will eventually die out once they move past a particular hot spot.
Most volcanoes are created through subduction zone volcanism or hot spot volcanism. The structure of a volcano depends on a number of factors, primarily the composition of the magma. Additionally, unlike land volcanoes, the magma produced at ocean ridges just hardens to form new material for the Earth's crust.
While this process typically takes hundreds or thousands of years, some volcanic mountains can be formed almost overnight. Paricutin is a volcano in Mexico that appeared on February 20, 1943, and within 10 years, it had grown to a height of 1,391 feet. As of 2014, there are over 500 active volcanoes on Earth. An active volcano is defined as one that has erupted within the span of human history, and every one of them is still in the "formation" process, adding more material to itself every time rock and ash is expelled through its vents.