Barracks
In order to train soldiers for invading or defending you will need to build a barracks on a planet.
The barracks requires a light weapons factory to be built first.
Once built a link becomes active on that planet to go to the barracks screen.
Soldiers are used to invade hostile planets during the game. Soldiers are also the most useful type in protecting your own planets from Invasion.
You will need 1 soldier for every 10 hostile workers you want to kill and 3 soldiers for every 2 enemy soldiers.