Boarding ships can be fun if you know what you are doing, but it can also be very frustrating.
The most vital skill for any marine is fighting. Without it they will be slaughtered on any serious operation. So they will have to pick it up along the way. You'll learn how to train them without much risk of their untimely demise later in this guide. Their other skills are: mechanical, hacking and engineering. When a boarding party reaches the target ship they will have to penetrate the hull. Two best mechanics will attempt to cut it with plasma cutters. If you sent them in a boarding pod they will have a better chance of breaching the hull – some ships cannot be entered without pods at all! Once they are through the hull they will have to fight through multiple decks to reach the central computer. The 2 best hackers will attempt to hack it and transfer the control back to you.
Note: Marines are cheap. Training is expensive. You may want to shop around and find marines with a high fighting rank so that your investment in training is safer. If your marine isn't good at anything you can always enslave and sell him to a pirate base or a mercenary (station).
Virtually all marine actions aboard the ship will damage it. However, if a marine that has been chosen for a specific task has training in engineering the damage will be reduced. If their actions cause the ship to go critical they will escape through the nearest airlock and you'll have to pick them up. Engineering is a passive skill, so training it is only useful after the marine in question has a chance of actually performing a task, which means high fighting, mechanical or hacking rank. I recommend training your marines in groups of 5: 2 in mechanical, 3 in hacking.
Some of the stations that sell marines also provide training, but it really depends on the sector they are located in. If a sector allows training then even Trading Stations will train them.
The most important skill, fighting, however, cannot be taught there. They will have to board ships to learn how to fight. The easiest targets are, surprisingly, TLs, if you you can get under their “skin”. A missile frigate is recommended for boarding those babies, and among them the Cobra is recommended above all else, as the least snail-like one. You can find unarmed TLs called “Arenas” and “Hospital ships” in race sectors. They are perfect for training up your marines – I've never had even 1 marine die when boarding these. If they have 5 200MJ shields you can strip them at once with a firestorm torpedo to minimize the reputation drop. Remember not to shoot any ships that go red on you because of your unseemly actions – just apologize a bit and they will back off.
The recommended course of actions when boarding these is to get your missile frigate to follow them while you are manually tailing them in your M6 or M7. Once the frigate is close enough to teleport to it and back you can start pounding on those shields. As the shields reach 0 teleport into your frigate and send the boys in. You can send as many as 20 to board a TL. Make sure there are at least 2 competent mechanics and hackers in the group. Jump back into your attack ship and keep those shields below 8% or your marines will die. If missile friagates and boarding pods and out of your reach, you can use a corvette to board other corvettes or TMs to train them up, but it's hard to keep your marines long enough for them to learn anything.
So you've got your merry bunch of cutthroats all trained up and ready to hunt real prey. Don't get cocky – a real combat vessel will kill them with turret fire before you know it. I recommend a lot of fighter drones and flails/wasps to overwhelm the target's defenses so your marines can reach their destination safely. Another tactic is to fry the enemy ship's weapons with Ion Disruptors (they can destroy everything but one of target's shields), but that takes a while. On the other hand, there's a chance that the ship will simply “give up” once its weapons and missiles are gone and stop moving, letting your marines fly in safely even without boarding pods. Also, Ion Disruptors will kill your marines quickly if they are unfortunate enough to be between the disruptors and their target.
There are 3 ship upgrades that, as far as I know, cannot be acquired by any means other than boarding ships that have them, that will make your boarding a lot harder. They are the hull polarization device, internal sentries and core firewall software.