Cola is bottled under pressure with CO2 forced into solution. Left alone, the liquid is nearly free of the tiny surface imperfections (nucleation sites) a bubble needs to form, so the gas stays dissolved far longer than equilibrium would predict — it is metastable.
A Mentos candy has a pitted, rough surface riddled with microscopic pores. Dropped into the bottle, each pore instantly becomes a nucleation site: thousands of them per candy, all activating within milliseconds. CO2 molecules rush out of solution onto these sites, bubbles form and grow explosively, and their combined buoyant rise drags liquid up and out of the neck as foam.
Warmer soda holds less dissolved CO2 at equilibrium (gas solubility falls as temperature rises), so it releases gas faster and produces a taller fountain. Higher initial carbonation means more dissolved CO2 available to nucleate. More Mentos means more total nucleation sites acting at once, but the pool of CO2 also drains faster — the fountain is more violent but shorter-lived.