I'm assuming you have a torsion spring? (the other type commonly found is an extension spring, but those are easy enough to install (open the garage door, attach the spring)
To attatch a torsion spring you need two winding bars. You put the spring into, and slowly wind it to add tension, then use some set screws to lock it in place.
Watch some videos on youtube, it will show you what to do.
Just note, torsion springs can be very dangerous. You can be seriously injured or killed when you are winding one up. Lock the garage door shut, unplug the opener, and no distractions while you are doing it, and make sure you know what you are doing.
I have done it before, and if you take your time, don't stand in front of the winding bars when adding tension it can be done, as long as you understand the danger and treat it with caution. A lot of people will say get a professional, and its not bad advise, but most people here use table saws, oxy torches, welding torches and manage to do so safely. The torsion spring can be just as dangerous, but the danger is not as obvious.