Okay, so you have a roof leak. Don’t Panic! First, you have to determine where the leak is coming from. If you have a stain on your ceiling, the most common causes are either a roof leak or air conditioning condensation. Go into the attic and analyze the area where the ceiling is stained. From there see if you find stained plywood. If so, then most likely it is a roof leak. If not, then you may me dealing with air conditioner condensation. Also be sure to inspect any areas where there are penetrations, such as a pvc pipe, or vent, because this is a common area for leaks.
Next it is time to inspect the roof. Walk around the area, above where you found the stain, and see if you feel any soft areas under your feet. If you do find a soft spot, then you could have rotted plywood and it could be seeping in through a nail or a roof penetration.
Also be sure to inspect the valleys of the roof.
If the shingles on the valley were not properly installed, then this can also be a source of leaks.
If you find any of these problems with your roof, it may be time to call a roofing contractor, or if you are handy, you can do the repairs necessary.