Unplug the pump and drain the fountain.
Rinse off the fountain with fresh water. Use pipe cleaners or a toothbrush to thoroughly clean the pump's tubing and any spouts, small openings and crevices in the fountain.
Pour a generous amount of vinegar into the fountain or into a bucket. Scrub all the surfaces of the fountain with the vinegar solution and a stiff brush. Vinegar has antibacterial and antifungal properties and will not damage the fountain's surface or tubing.
Alternatively, use chlorine bleach to scrub the surfaces. Allow the fountain to dry and then rinse it thoroughly with clear water to remove all traces of the bleach.
Reattach the tubing and refill the fountain. Consult your retailer or fountain manufacturer for recommendations on additives for the water to retard future algae growth.