Algae is a very common problem. It’s caused by two things: light and excessive waste. If you run lights over an unplanted tank, or you tank gets sunlight, keep them off, cut down on the length of time they’re on, or add plants. If you haven’t changed water in a while, do so. High levels of nitrate or phosphorus can cause large amounts of algae. Adding plants will soak these up, and water changes will dilute them.
As a last resort, add an algae eater. Probably the best is the Siamese Algae Eater. Mollies are good for eating fuzz, hair, and beard algae, but they require a lot of space, at least 20 gallons, as well as a fair amount of salt. An ottoclinus will eat almost all kinds of algae, but needs to be kept in groups of three or more.
A plecostomous will eat a lot of algae, but lives for a very long time, gets VERY big, and actually loses its appetite for algae after a few years.