Boarding is the act of inserting troops onto an enemy ship in an effort to sabotage or capture it. Boarding was a common tactic in naval battles before weapons capable of seriously damaging a ship from a distance were developed, but the invention of turrets marked the beginning of the end of boarding actions as a significant combat tactic.
Boarding is an extraordinarily rare tactic in modern warfare, as modern warships are capable of engaging each other with missiles from miles away. Boarding in the modern era is generally limited to attacks on unarmed merchant ships. There was a boarding action of note during World War II when the US Navy managed to board and capture the Nazi U-Boat U-505. The captured sub is on display at the Chicago Museum of Science and Industry.
Boarding Actions in Science Fiction
Futuristic technology -- especially teleportation technology -- allows new opportunities to board enemy ships in battle. Given the desire of writers for face-to-face confrontation with the enemy, boarding actions actually occur with surprising frequency in science fiction stories. Acquisition of new technology or starship assets are often factors in SF conflicts, providing motivation for ships to attempt boarding actions.
Star Trek civilizations with transporter technology can use it to insert troops onto enemy ships that have lost shield function. For unknown reasons, Star Trek forces never attempt to transport enemy crews out of their ships in these situations.
Star Wars forces typically have to insert troops in a rather conventional fashion, by disabling the target vessel and then cutting their way through an airlock or the hull itself. Ion cannons are designed to cripple ships without causing serious damage, creating opportunities for boarding actions.