The pull cord on your hedge trimmer turns the flywheel when the engine's cold. When the flywheel spins fast enough, it will connect with the ignition module, which will send an electrical charge up to the spark plug for combustion. The pull cord attaches to the flywheel through a pulley and recoils after you let go due to a spring inside the pulley.
Recoil Spring Problems
The most likely reason your pull cord won't rewind is a broken or worn-out recoil spring. This spring hooks onto the pulley; when you pull the cord out, you stretch the spring. When you let go of the cord, the spring snaps back and the cord rewinds. If you pull too hard on the cord, wrap the cord around your hand when pulling or pull the cord in the wrong direction, you can damage the recoil spring. These springs can't be fixed, they can only be replaced. If you've replaced the cord recently or rewound the cord, you'll have to reset the tension on the recoil spring. This involves rewinding the pulley with the cord partially withdrawn. If you don't do this process properly, the cord will not rewind.
The hook inside the pulley, which connects to the spring, is made of plastic. It can break off if you pull too hard on the cord, wrap the cord around your hand or pull it in the wrong direction. The pulley sits on a metal starter post; if this post isn't lubricated with engine grease from time to time, the pulley may not spin adequately inside the starter. The pulley can also get bent or warped due to age. Like the spring, the pulley cannot be fixed, only replaced.
The pull cord's outer layer can get covered in dirt, pitch, sap or any other sticky substance. If it doesn't spin along the pulley properly, then it won't retract as it should. The cord can fray at the base, or a knot may develop in the base, which would lead to recoil problems. Replacing the cord on a bi-seasonal basis will ensure that the cord isn't causing you problems.
More serious but less common are problems within the engine. The flywheel connects to the crankshaft via a locking key. If this key gets bent or sheared, the flywheel won't spin properly and the cord won't retract. Even more serious are crankshaft problems. When the hedge trimmer gets older, the seals on either side of the crankshaft can wear out, causing air to leak into the engine. When this happens you may notice that the cord won't pull out at all; and if you manage to get it out, it won't retract. These problems will likely require a new engine, which may outweigh the cost of a new hedge trimmer.