Cloned from Jango Fett, the troopers were made to age twice as face as a regular human and to be less independent in thought than their "father". The cloning was done on Kamino, where they clones spent the first ten years of their lives training for war.
Then Yoda arrives to pick all the Clones up and whisk them away to fight on Geonosis. Nevermind that they all look just like the bounty hunter Obi-Wan was trying to capture, these guys dressed in white.
The Clones engaged CIS forces in the Battle Of Geonosis, and rescued the remnants of Mace Windu's task force in the Petranaki Arena. They went on to win the battle, but it was a loss for the Jedi who were attempting to prevent the war in the first place.
Phase 1 officers were color coded: Sergeants were green, Captains were red, Lieutenants were blue, and Commanders were yellow.
By the end of the Clone Wars, the clones had fancy new helmets and were bursting with fruit flavor. Legions, Battalions, etc distinguished themselves with colors and patterns, a practice encouraged by the Jedi that led them into countless battles. Some even did stupid hair cuts to be even more different.
The Clones were fiercely loyal to their Jedi generals, but their loyalty to the Chancellor was proven to be second to none when Order 66 was issued. Almost all clonetroopers who received the order attempted to kill all Jedi in their sites, or die trying.