You need to remove the struts. Then use a spring compressor to compress the strut springs. Then you can remove the nut on the top. Put the springs on the new struts and tighten the nut. Loosen the spring compressor. Then install the new strut and spring assembly on the vehicle.
DON'T replace a strut if you are taking the spring out. it is dangerous. get the Hayes repair guide to tell you how to do it properly. you usually just have to un bolt it at the bottom and take off the three little nuts at the top.