Koon's ship crashed into a clone staging area, which resulted in the deaths of 141 clone troopers. Jag and the other trooper on patrol, CT-57/11-9048, opened fire on Koon and killed him instantly. While on patrol, the clones received Order 66, the order to kill all Jedi leaders.
In 19 BBY, the 127th Gunship Wing and Koon were deployed to Cato Neimoidia.
Luckily, however, Jedi General Plo Koon took a shine to Jag and put him in charge of flying the experimental Aggressive ReConnaissance-170 starfighters. However, the battle turned on the Republic, which forced the Republic and the 127th Gunship Wing to retreat, which disgraced Jag and resulted him in becoming demoted to Captain. Later during the Clone Wars, Commander Jag flew in the Battle of Katraasii. There are many similar rank names, with some fictional flavor added, of course.
Commander Jag was first deployed during the battle, where he fought. Out-of-universe, the inspiration seems to come from the military rank systems on Earth, with great influence of American and British systems. The 127th Gunship Wing was first deployed to the planet of Geonosis for the Clone Wars' first battle, the First Battle of Geonosis.