Part of this depends if you are dealing with a type 1 or a type 2 supernova, as the mechanisms are different.
A type 1 supernova occurs as a neutron star sucks hydrogen from a companion star, building up a layer of hydrogen on the surface. Because of the massive gravitational gradient, the Hydrogen is being compressed to near nuclear density, and as more hydrogen infalls from the companion star, the pressure on the static column rises until the conditions to initiate fusion exist. All the hydrogen stuck to the surface of the neutron star fuses all at once (or close enough to that) and an incredible display of light and energy occurs.
Since this is reasonably well known, the civilization needs to observe the neutron star closely and calculate just how much hydrogen has already fallen to the surface of the neutron star in order to calculate how much time they have to prepare. With enough superscience, they could find a way to interrupt the infall of hydrogen from the companion star, averting the Type 1 supernova.
A type 2 supernova is much more powerful, and harder to interrupt. As a giant star star burns its hydrogen, the helium "ash" accumulates in the core. When the hydrogen runs out, the gravitational pressure takes over and the core starts to collapse, until the pressure is great enough to initiate helium fusion. The cycle continues at shorter and shorter intervals as elements higher up the curve of binding energy are fused (oxygen, carbon, silicon and so on). Once you reach iron, the cycle ends, since there is no net energy from fusing (or fissioning) iron. The gravitational potential takes over and the mass of the star falls inwards for a core implosion, leading to the massive release of energy that is a type 2 supernova (and the extra energy needed to create the heavy elements beyond iron in the periodic table). A type 2 supernova can outshine the entire galaxy for a short time, hence the need to not be in the neighbourhood when that happens.
A huge handwave to stopping a supergiant star from collapsing into a type 2 supernova would be to somehow strip mine the upper layers of the star and eliminate the mass which will drive the collapse of the core before the star fuses all the nuclear fuel into iron. Your civilization will need ultrascience to accomplish that sort of stellar engineering...