You go into the same menu used to design ships. If you have the proper techs researched (construction then troops) then troops will be one of the options for design.
Build em on any colony and pick em up with transports drop em on ANY enemy planet and watch the battle.
So yes you can use your gas giant troops to attack rock or ice planets.
To capture enemy ships you either use intel projects or boarding parties. Either way you need to research the tech. Military science level 2 for boarding parties I think.
Once you capture the ship you can send it to one of your planets with a space yard and analyze the ship to learn the techs on it.