Now, about that stain itself. Plain latex paint will not cover a water stain. It seems like it should — you put white paint over a brown spot, problem solved — but water stains contain minerals and tannins that bleed straight through water-based paint, sometimes requiring four or five coats with the stain still showing through. The correct product is a stain-blocking primer, and specifically an oil-based or shellac-based one. Zinsser BIN (shellac-based) and Kilz Original (oil-based) are the two most commonly recommended. Spray cans work well for smaller stains and make it easier to get even coverage without brush marks. For larger areas, a roller with an extension pole is more practical.
Apply one coat of the stain-blocking primer, let it dry fully (check the label — usually an hour for shellac, a bit longer for oil-based), and then look at it in good light. In most cases, one coat does it. If any shadow of the stain is still visible, do a second coat before moving on.
After priming, the rest of how to fix a water stained ceiling comes down to matching your existing paint. This is where people sometimes get tripped up. If your ceiling paint is flat white and has been up for a few years, a fresh patch of bright white is going to stand out. The ideal solution is to repaint the entire ceiling — a gallon of flat ceiling white is pretty affordable and a ceiling roller job goes faster than most people expect. If you'd rather spot-patch, tint your paint slightly toward the existing ceiling color, feather the edges out wider than the stain, and accept that it might not be a perfect match.
One thing worth checking before you close out the job: look at the texture. If your ceiling has a knockdown or orange peel texture and the water damage has flattened or damaged it, you'll need to retexture that area before painting. Aerosol ceiling texture spray is sold at most hardware stores and works reasonably well for blending small areas. Practice on a piece of cardboard first to get a feel for the spray pattern and distance.
The whole process — primer, paint, texture if needed — is genuinely a Saturday morning project for most ceiling stains. Knowing how to fix a water stained ceiling is one of those skills that pays off repeatedly as a homeowner, because these things happen in almost every house eventually. The real mistake isn't the stain itself — it's either ignoring it or painting over it without the right primer and a confirmed dry surface. Get those two things right and the rest is straightforward.