If water is getting into your wall from rain, a sprinkler that's too close to your house, or even from a plumbing leak you're likely to see patches of damage on your walls near the spot of the intrusion. That's because drywall has a paper backing, so when it gets wet, it can bubble and wrinkle, sort of like a sheet of paper does.
To diagnose the problem, place a four-foot level across the damaged area and learn how much the sheetrock has sagged. If it's more than about 3/8 of an inch, the structural integrity of the drywall is probably ruined and the section should be replaced.
If no sagging has occurred, use an awl to randomly push into the sheetrock. You should feel substantial resistance, and the awl shouldn't be able to penetrate the sheetrock any more than 1/8 of an inch without excessive force. However, if the awl goes through the sheet rock much deeper than 3/16 of an inch, consider replacing the section.
To replace the section: Use a utility knife to cut out the damaged area, leaving a square or rectangle so it's easy to match up with a new patch of drywall. Look in the hole to see if the damage goes deeper than the drywall (to the studs, for example) and find the source of the leak so you can stop it before you fix the wall. Set up a fan near the hole you created and thoroughly dry the area before continuing. Cut a new piece of drywall to fit tightly into the hole you have created. You may have to back it with a piece of plywood. Then attach the drywall and use a good-quality drywall tape to cover the seams.
Prime, paint and keep a close eye on it in case the damage returns. That could signal a more serious water problem than you suspected.
To repair the damage: If the damage is superficial, you may not have to replace the drywall. Dry the area thoroughly, sand the blisters from the wall and prime the spot with a pigmented lacquer product called KILZ. This product will keep the stain from bleeding through a new coat of paint.