Hi Acquauomo,
The many species of algae in the world are natural things in freshwater environments and are of course not harmful to fish and even part of the diet of some. Many of them are, however, considered unsightly in excess in our aquariums.
Algae are found is all parts of the earth and are most often spread while in their "spore" state (similar to the spread of plant organisms by both seeds and spores.) The two things that bring them out of their spore state are ammonia and light, and indeed these are the two main growth triggers associated with algae. Both of these things can help you in controlling algae in your aquarium.
Ammonia is the factor over which you have less control. A proper ammonia concentration in a mature, correctly running freshwater aquarium (a level between absolute zero ammonia and the zero ppm that our liquid test kits detect) is achieved via a good mature biofilter and good maintenance habits of weekly gravel-clean-water-changes of significant volume and good regular filter maintenance that keeps the nitrate level steady and low. Learning how to not overfeed and be an important factor.
Light is the factor over which you usually have much more control. Light in the aquarium is first dictated by the presence and type of live plants you are trying to grow, so you'll need to advise the members here of that. With no plants, the lighting periods should be minimal and determined by the family viewing periods. In this case lights should not be left on for long periods when there is no viewing. With plants it gets more complicated because they need at least 4 hours to get their photosynthetic machinery up and running and producing some useful sugars for the plant - therefor any periods when you leave the light on for less than 4 hours only benefit the algae, not the plants. Meanwhile, the plants get various signals from the length and pattern of of lighting, not to mention the brightness. Some plants need enough hours to get the signal that it is their growing season, or they will want to go into submission, rather than grow and flourish.
In most beginner aquariums where you are not focused on the subject of aquarium plants particularly, you often want the lighting to be between 1 and 2 watts per US gallon and you want to play with the number of hours between a low of about 4 hours and an upper range of 6, 8, 10 or maybe 12 hours (each of those getting successively riskier in terms of excess algae breaking out.)
While all algae is triggered by light and ammonia, once a particular species has appeared in excess in your aquarium, it can be best dealt with on a species by species basis. Getting rid of green spot algae is different from diatoms is different from black brush algae is different from a water born bloom and on and on, you get the picture. If you indeed have green spot algae, mechanical cleaning, increased water changes and cleanings are a good combination along with the major thing of implementing a reduction in light (sun of course usually puts you out of control.)
~~waterdrop~~