Volcanic rocks are born as lavas or layers of ash, and stack up eruption after eruption, sometimes thick enough to form islands such as Japan and Iceland (in the featured image) on the mid Atlantic ridge. Much of the rock in the latter is basaltic, but gets transformed after its birth into a variety of chewed up and brightly coloured rock remnants. ]
As ground or sea water percolates into the lava, it interacts with the magma or pressure heated rocks below, and starts to be chemically active, carrying some elements away and leaving others behind, depending on the ambient conditions.
Some of these hydrothermal convection cells are hundreds of km across and several deep, and they help refine many of our mineral deposits, leaching metals out of the lava, concentrating them in fluids and precipitating them elsewhere when they encounter a change in pressure/temperature, PH or other chemical conditions.
Any rocks can be altered in this way, for example banded iron formations often have the silica leached out by fluids, enriching the iron content of the remainder (a process called supergene enrichment in the mining trade), but volcanic ones such as these hills in Iceland often produce a lush series of colours like the ones in the photo. The colours can give information on the distribution of elements in the alteration zone, which typically takes the form of haloes around the hydrothermal cell.
Image credit: Euskadi69