To replace the recoil spring on a semi-automatic handgun, remove the clip, clear the chamber, field strip the gun, remove the spring and insert a new one. The specific procedure to field strip the gun and properly position the recoil spring depends on the make and model of the firearm. Always consult the manual for your specific semi-automatic handgun's maintenance procedure.
Before starting any maintenance process on a gun always make sure the safety is on and the weapon is completely unloaded. Semi-automatics have ammunition in two places. Eject the magazine first, and then pull back the slide to eject any round that is in the bore to make sure the weapon is clear.
Releasing the slide typically requires a special tool designed for a specific gun model or manufacturer. Once the slide is removed the recoil spring is clearly visible. Remove, replace, position and tension the recoil spring according to the gun manufacturer and recoil spring maker's specification. Reassemble the pistol and test the recoil spring for smooth operation, complete cycle stroke and proper casing ejection distance.
The type of replacement recoil spring you choose to install depends on the type of ammunition load that is used. Conventional springs are typically better when shooting heavier loads, while variable springs tend to work better for lighter loads and target shooting.