Occasionally, studs in the wall can become damaged or rotted by moisture, pests or dry rot. The wall will become spongy and the drywall may separate and bulge. It is not that difficult to replace individual studs; the hardest part of the job is removing the drywall to expose them and replacing it when you are done. The job is easier if you have a reciprocating saw, but you can also do it with a handsaw, a drill and a hammer.
Remove the drywall from the studs to be replaced with a drywall saw. Cut out a section that extends from the top and bottom plates to the middle of the studs on either side of the damaged ones. Remove the drywall screws or nails and use a utility knife to trim the drywall edges so that they are smooth and so that you have wood on all four sides on which to attach new drywall.
Remove all wires from the studs. If water pipes are passing through holes in the studs, make notches in the holes with a reciprocating saw so you can slide the pipes out.
Cut the nails or screws holding the studs to the top and bottom plates by fitting the blade in the gap between the studs and the plates. Use the reciprocating saw and a metal-cutting blade. If the studs are in an exterior wall, use this technique to free the studs from the siding by cutting the nails or screws. Also remove these from outside the house if you prefer.
Remove the damaged studs and fit new ones in place. Cut notches in the new studs to accommodate any pipes that have to run through them, covering the openings of these notches with metal plates to prevent drywall screws from piercing the pipes. Plumb the new studs with a level and attach them to the top and bottom plates with 2 1/2-inch screws, then reattach the electrical wires with wire staples.
Cut new drywall to fit in areas where drywall was removed and screw it to the studs with drywall screws, being sure to sink the heads of the screws into the paper of the drywall.
Apply joint compound to the seams of the new drywall and place drywall tape along the seams. Scrape away the excess joint compound with a blade and let it dry overnight.
Apply two or three successive coats of joint compound, letting these dry overnight and sanding in between coats, until the wall is flat. Then prime the wall and paint it.
Reattach exterior siding and trim to the new studs with screws or nails, removing the old ones as you go. If the heads are not protruding, you may just want to leave them in place.