Purchase a safety cable kit at your local hardware store or garage door dealer.
Fully open the garage door. Have someone stand by the door to make sure that nobody closes it while you are working on it.
Position a stepladder under one side of the door behind the extension spring.
Tie the end of one of the safety cables to the rear door hanger (the track and spring are attached to it). The safety cable should be tied off above the spring connection on the hanger.
Thread the cable through the center of the extension spring. Make sure the cable comes out the other end on the outside of the spring pulley.
Move the stepladder to the front of the door track. Grab the end of the safety cable and insert it to the farthest hole on the horizontal track.
Loop the cable back to the next hole and pull it tight. Finish tying off the end of the cable and loop any excess around itself.
Repeat the installation process for the opposite side.