Dry out the insulation and top of drywall, then replace (fluff up well if cellulose) - toss out and replace if mildewy/moldy. Kilz the top side of the drywall ceiling if badly stained or moldy, after using undiluted chlorine bleach to kill it (and letting it dry thoroughly).
Use oil-based Kilz - two coats necessary if dark stain - on the ceiling stains, then top coat with interior paint to match surrounding area. This assumes drywall/plaster ceiling - if wood, then you need to sand the brown spots off, use a penetrating sealer designed for stains, then stain or paint to match.