Clone Troopers are highly trained soldiers first used by The Galactic Republic during The Clone Wars, and some clones later served the Galactic Empire. 25 years later, the Galactic Federation requested the creation of a new generation of Clones for their own use, and later being used by the New Republic.
Before the Battle of Naboo, Jedi Master Sifo-Dyas believed that war was coming soon to the galaxy. He advocated the idea of a clone army for the Republic, but the idea was rejected and was ultimately cast out of the Jedi Council. Enraged by the decision, he secretly contacted the Kaminoans, who were experts at cloning, to create the army anyways, without authorization from the Galactic Senate and Jedi Council.
Sifo-Dyas was later killed by the Pyke Syndicate, allowing the Sith to take over the project. Count Dooku recruited Jango Fett to become the template of all Clone Troopers.