Is it still wet? If so, get a clean white cloth and place it under the scarf. Take another clean white cloth (you can use face clothes or towels) and wet it with cool water. Blot at the stain until it comes clea.
If it's still dirty or the stain has dried, then give the scarf a nice soak in a basin with some cold water detergent (e.g., woolite) with cool water.
Squeeze the scarf in the water to soak it and work the mix into the fibers -- don't scrub or wring the scarf or it will damage the scarf. Empty the basin and put cool water in again -- no detergent. Put the scarf back in and let it soak. Squeeze out the water and repeat the rinse step a few times until all the soap is out and water runs clear. Pull the scarf into a ball and give a final squeeze to get out the remaining water and re-shape the scarf on a towel and let it dry naturally.
Hope this helps!