Place a stepladder under the area of popcorn ceiling that is stained. Lay plastic tarps on the floor to prevent it from getting splattered with paint.
Climb up onto the stepladder and attach another plastic tarp around the area that is stained. Secure the tarp to the ceiling with painter's tape or tacks if needed. The entire stain should be enclosed inside a square of tarp when you are done.
Scrape off any loose texture, using a putty knife.
Put on a pair of disposable rubber gloves and open a spray can of stain-blocking primer. Hold the can inside the hanging tarp with the nozzle pointed at the ceiling. Spray a thin layer of primer over the ceiling until you can no longer see the stain.
Allow the primer to dry completely, and then hold a can of spray texture under the tarp just as you did with the primer. Apply a thin layer of texture to the ceiling area to disguise the repair.
Allow the ceiling texture to dry for two to three hours, and then remove the tarp and discard it.