The exact method depends on roof material and type of contamination
Brush dirt off and out from under repair area. Clean all dirt and oxidation from the roof surface. The exact method depends on roof material and type of contamination or oxidation.
For small repairs use some solvent and a rag and scrub the repair area. As needed, use a abrasive scrubber. Wipe and scrub until clean.
If you are re-roofing large areas you should pressure wash then aggressively scrub surface using a stiff street broom (keep scrubbing until the roof is completely white again). Generally stiff brooming with a floor cleaner is good enough. You are ready to Prime.