Most drywall damage falls into one of two groups: damage to the surface, and damage to the board itself. Knowing which one you have tells you most of what the repair will involve.
Surface damage is the easy kind. Dents, nail pops, small holes from anchors, and a doorknob-sized hole are all patch jobs. The board around them is still solid, so the repair is a matter of backing, a fitted piece of drywall where needed, tape, and compound feathered out wide enough that there's no ridge to catch the light.
Board damage is different. Drywall that has been wet goes soft, swells, or crumbles at the paper, and no amount of compound will fix that. If you can press a thumb into it, if the paper is bubbling, or if a ceiling section is sagging between the joists, that section needs to be cut back to solid material and replaced. The same goes for any spot with mold on the back of the board.
The other question is why it happened. A patch over an active leak or a moving crack will fail again. Before any repair, it's worth finding the source: a slow drip from the bathroom above, a missing vent fan, or a joint that was never taped. Fix the cause first, then the wall, and the repair only has to be done once.
