Post some pics to let us see how bad yr situation...If it is not that serious, just get a scrup to clean it off or a siphon.
Otherwise, red slime remover will do.
Phosphate, nutrients, nitrate, waste, fish food...all these contribute to increase level of nitrogen which is a ""fertiliser" for algae.
Nitrogen is the main source of plant growth in nature.