Set up a ladder and inspect the damage closely. Black or green speckles or spots indicate mold. Peeling paint means a moisture problem. Softened areas of the ceiling sheetrock may mean a leak coming from above.
Slide a putty knife held at a 30-degree angle across the surface of the ceiling to dislodge loose chips if peeling paint is a problem. Scrape so that the edges blend well with the surface. Sand lightly.
Apply wallboard compound if necessary to blend the scraped area to a level surface, using a putty knife. Sand lightly between coats to level high spots. Allow to dry thoroughly.
Wash a mildewed bathroom ceiling with a strong solution of 1/4 cup trisodium phosphate to 1 gallon of water, then swab with chlorine bleach and allow to soak for an hour or two.
Roll on stain-killing primer and allow to dry.
Repaint the ceiling with a mildew-resistant latex paint.