The shaft on a string trimmer contains a driveshaft and a protective tube. This driveshaft is usually connected to the clutch or the crankcase. When the engine turns, the driveshaft also turns, spinning the head along with it. The head, therefore, will cease to spin if the driveshaft and trimmer shaft aren't operating in unison with the engine. The outer tube can also get bent or damaged from improper storage and accidental drops.
Unscrew the front handle's mounting screws and remove the handle. Unscrew the trigger handle and separate the two halves from the shaft. Disconnect the short-circuit wire and throttle cable from the shaft using the flat tip of the screwdriver to pry them loose. Disconnect the throttle cable and short-circuit wire from the engine, if they are attached to the shaft at the rear, where the shaft meets the engine.
Take out the screws holding the drive tube to the engine; the number of screws will vary from trimmer to trimmer. Some trimmers may also have a secondary clamp where the drive tube meets the engine; unscrew the clamp. Hold the engine steady while you pull the shaft straight out of the engine.
Unscrew the gear head from the shaft: again the amount of screws and retaining method will vary from model to model. See operator's manual for assembly instructions and reverse the process. Slide the gear head off the drive tube.
Pull the driveshaft out of the old drive tube if you are replacing only the drive tube. If the driveshaft is broken, bent or doesn't spin inside the drive tube you'll need to replace it. Pull out the flexible liner from the drive tube, if your model uses such.
Install parts in reverse order: Slide the flexible liner into the new drive tube. Grease the driveshaft with multipurpose engine grease using your fingers to coat the entire length of the driveshaft. Push the driveshaft into the flexible liner or drive tube until it reaches stop. Test that the driveshaft will spin inside the drive tube by turning it with your fingers.
Refit the gear head to the end of the shaft and tighten down the retaining screws to secure the gear head in place. Push the shaft into the engine and tighten down all screws or retaining clamps. Reconnect the throttle cable and short-circuit wire if you removed them. Refit the trigger handle and reattach the short-circuit wire and throttle cable to the handle. Refit the trigger handle to the new shaft. Refit the front handle to the new shaft.