Unfortunately, water stains in a ceiling are nearly impossible to remove. The water will have actually altered the ceiling and this is what causes the discoloration. If your ceiling is white, you may be able to bleach it, after the stain is dry. Make a bleach solution with water and bleach, and apply to the stain. You will likely have to paint over the stain, but be sure to seal off the stain first, or it will continue to leach through and keep reappearing. You can buy a sealant at home improvement or paint stores.