You have an algae bloom. They are common. Is you tank near a window or does it receive natural sun light through out the day. If yes this is most likely the cause. If not you have to much nutrients in the water (nitrates and phosphates). High nutrients can be caused by overfeeding, not cleaning filter media, not enough water changes and gravel vacs. are the main causes. Here is what you should do to solve the problem. You can buy a diatom filter or UV sterilizer although these are not a must and can be rather expensive.
The best way to control this in a fresh water tank is:
1. up the aeration
2. add live plants (to consume the nitrates)
3. 25% weekly water changes with gravel vacs.
4. clean filter media monthly in tank water not tap water
5. proper feeding
P.S. you can also add a commercial solution to the tank such as "Algae Be Gone" or some other similar product for overnight results, but you must practice the things I stated to keep it from happening again. GOOD LUCK