(covers information from several alternate timelines)
A volcano was an opening in a planet's crust, often formed into a mountain, from which molten lava and gases were ejected in what was known as a volcanic eruption. Volcanoes produced igneous rock and pyroclastic flow.
One of sixty-two moons orbiting a specific gas giant had a volcanic terrain. When Commander Charles Tucker III and Arkonian pilot Zho'Kaan crash landed there in 2152, the fact that the terrain – due to the volcanic activity – was rich in diamagnetic minerals interfered with a distress call from a makeshift transceiver Tucker set up, the minerals preventing the signal from being transmitted. (ENT: "Dawn")
In January 2153, active volcanoes were created on a planet whose orbit had recently shifted, taking it between a pair of gas giants. The volcanoes came about because the gravitational pull of the gas giants caused the core of the other planet to superheat. Starfleet was able to predict the formation of the volcanoes less than a week in advance, also forecasting they would cover the planet. Commander Tucker even reckoned the "geological fireworks... could be fun." The volcanic activity was observed by his ship, Enterprise NX-01, using thermal scanners, and six imaging relays which had been deployed by the ship in high orbit of the erupting planet about thirty hours beforehand. Some of the eruptions from the planet got close to Enterprise, so the ship withdrew by 5,000 kilometers. The volcanic activity unearthed multiple microbial lifeforms which had henceforth been living underground, so Enterprise became aware of them for the first time. (ENT: "Horizon")
Volcanoes on Penthara IV were activated when subterranean pockets of carbon dioxide were opened by a phaser drill. The volcanoes started to erupt and produced large plumes of volcanic dust, threatening to bring another ice age on the planet. (TNG: "A Matter of Time")
In the alternate reality, a supervolcano on Nibiru threatened to destroy all life on the planet, including the indigenous Nibirans. The threat was averted when Spock, wearing an especially heat-resistant environmental suit, activated a cold fusion device in the magma chamber, rendering the volcano inert. (Star Trek Into Darkness)
In the writers' second draft script of ENT: "Breaking the Ice", Reed remembered having once stood on an active volcano in Japan, which had melted his boot soles. He referred to it as "arguably [...] the newest piece of rock out there."
The group tasked with depicting the volcano in Star Trek Into Darkness obviously had to find a way to do so without subjecting Spock actor Zachary Quinto to the harsh conditions of an actual volcano. (Star Trek Magazine issue 172, p. 48) A concept illustration of the volcano can be viewed here. Precisely how the volcano sequence would be filmed was the subject of some early discussions between Visual Effects Supervisor Roger Guyett and Cinematographer Dan Mindel. They opted against shooting the sequence indoors, Mindel then deciding that the necessary live-action footage would be captured on a night shoot.  Director J.J. Abrams was also involved in choosing which elements would come together to form the sequence. "As with everything J.J. does, he wanted this to look as realistic as possible," reflected Pyro Foreperson William Aldridge, "and he wanted a good mix of practical and CG effects." (Star Trek Magazine issue 174, p. 80)
Part of the volcano in Star Trek Into Darkness was built as a physical set, outdoors in Marina del Rey, California.  The set was comprised of an eighty-foot-long set of volcanic rocks backed by green-screen and was located on the Playa Vista lot. (Cinefex, No. 134, p. 78) Despite the fabricated nature of the set, the production team endeavored, for Zachary Quinto's benefit, to give the environment a realistic ambiance and a sense of feasibility, using such elements as heat, light sources and smoke to provide interaction. Related Roger Guyett, "You weren't standing on a green rock, you were standing on a textured surface and you had smoke and stuff was blowing through." 
The production crew filmed the volcano sequence at night. (Cinefex, No. 134, p. 78) Dan Mindel remarked, "We shot it all at night so we could control the lights and manipulate it so that the steam that we were making would block out the sun and give us a lot of texture. All the sparks and fire is real."  The team used fire-bars and ember-generators to create the on-set pyrotechnics. (Cinefex, No. 134, p. 78) "We had a lot of fire, and a lot of fireballs, shooting 30 feet up into the sky [....] There is something very rewarding about going to work and creating a 30-foot fireball," William Aldridge remarked, laughing. (Star Trek Magazine issue 174, p. 80) To produce the sparks, the creative staff adopted one of the oldest special effects in Hollywood, which used to commonly be employed to make campfire sparks in movies set in the Wild West; the group used a Venturi air system to inject particulate – which, to generate the sparks, had to be ground-up, organic material – into an extremely hot flame, resulting in the airflow creating embers that flew into the sky. "We went to a commercial supplier and bought very fine ground charcoal, made from burnt coconut shells," remembered Special Effects Supervisor Burt Dalton. "We placed about a dozen blower motors around the set, with two or three weed burners per source to create heat. Then we installed Venturi devices, injected the ground charcoal into the airflow, which ignited the product, and the high-pressure airflow jettisoned massive amounts of embers into the sky." (Cinefex, No. 134, p. 78) William Aldridge enthusiastically recalled, "We built these really nice spark machines. They were very cool [....] We [...] built a spark machine that expelled this coconut charcoal. We put that in these little air movers and propelled it through jets of fire, so it would look like volcanic ash and substance. It was crazy to see all of that shooting around the set but, man, it looked incredible." Aldridge was highly approving of the use of the volcano in general, describing it as "a great sequence." (Star Trek Magazine issue 174, p. 80)
The full effect of the volcano relied, of course, on visual effects, courtesy of the film's VFX team. In fact, apart from the live-action footage, Roger Guyett wanted additional aspects of the volcano to be achieved with an entirely CGI approach. This was influenced by having worked on a tricky volcano sequence in Star Wars Episode III: Revenge of the Sith, set on the fiery planet Mustafar and incorporating practical, miniature and digital work. Under Guyett's supervision, Industrial Light & Magic supplied digital backgrounds, lava simulations, embers, and additional smoke for the Nibiran volcano.  The company used a three-dimensional model of Spock's volcano suit to reflect environment projections of the vast lava-filled cavern. The visual effects artists also generated a flat plane of the environment in CGI, before digitally mapping the volcano's churning contents. Fragmenting crust – floating on the surface of the lava and layered with heat distortions – as well as magma eruptions were all depicted in lava simulations which involved approximately forty render passes. "Roger then guided us to place explosions and geysers," continued CG Simulation Supervisor Dan Pearson. "We generated smoke by exporting particles from the sim and loaded those elements into our Zeno animation pipeline so we could see the effects interacting with the environment." (Cinefex, No. 134, pp. 78 & 81) Noted Guyett, "The guys worked very hard to capture the volatile nature of the lava, along with all the extra details, like the embers." Guyett went on to say that, because Nibiru was conceived as a different planet than Earth, "It didn't have to be completely based on the physics of our world. We could push some of the boundaries a little bit." (Star Trek Magazine issue 172, p. 48)