Small holes from nails, anchors, and doorknobs are patch jobs. The key is feathering the compound out wide enough, and sanding it smooth enough, that the patch disappears once it's primed and painted.
Larger holes and damaged sections usually need a new piece of drywall screwed to the framing, then taped and finished in several coats. Trying to fill a large hole with compound alone leads to cracks and bulges later.
Water damage is different. Before we repair a stained or sagging ceiling, we check that the leak is fixed and the area is dry. Wet drywall that gets painted over will stain again, and soft board should be cut out and replaced.
Cracks that keep coming back at the same corner or seam are often a sign of movement. We reinforce the joint rather than just filling it again. Either way, the repair gets primed and painted to match, so you're not left with a patch that shows.
