Flat spots can be repaired. Sometimes you can fix one by loosening the spokes at the flat spot and tightening all the other spokes in the wheel. More severe flat spots require removing two or three spokes at the damaged area, hitting the rim outward with a mallet until it bulges out just a little beyond round, then reconnecting and tightening the spokes where the flat spot used to be.
Fixing a flat spot
Another common wheel problem is called "kinks." Kinks come from hitting stones, curbs or sharp edges in the road. Keeping the tires fully inflated will reduce the likelihood of kinks occurring. Riding just one inch above the seat when on rough terrain helps too. You can still maintain total control of the bike, but your weight is on the pedals, not the seat, allowing the bike to rock over the bumps, and your knees act as shock absorbers.
Kinks are repaired easily by hitting them back into position with a hammer, or by squeezing the rim with pliers. Use cloth between the pliers and the rim to prevent tooth marks.
If you have a broken spoke, simply replace it before you align the wheel. On a wheel from a derailleur-equipped bike, you will need to remove the freewheel first. (See the section about rear wheel bearings.)
On the road you may not have replacement spokes available. If an mishap has ruined several spokes in one section of a wheel, you can redistribute the remaining spokes to hold the wheel together long enough to get to a bike shop. You can even use a couple of spokes from the other wheel.
On the road, if a spoke has broken near the hub, you can loosen it, bend it around a nearby crossing of spokes, and then retighten it. This spoke will then be able to continue to support the rim until you can replace it with a new one.
If you cannot get the proper length spoke to replace a broken one, you can use a longer one. Cut off the curved end. Bend a dog-leg (double L) in the spoke at the exact place where the end is supposed to be. Even though it looks unlikely to stay properly bent, this home-made replacement will work well.
If you have replaced a spoke which has broken near at the hub, and then others break shortly thereafter, your spokes may be worn out. They can become fatigued (crystallized) at the hub after lots of riding. When this happens, they all need to be replaced. Otherwise, you'll be replacing them one at a time, seemingly forever! This condition is common in back wheels, but uncommon in front wheels, since rear wheels carry much more weight.