The act of boarding is to attempt to enter another ship while in engaged in ship-to-ship combat. Boarding another ship can be a fairly risky endeavor, but pirates sometimes choose to do so due to the rewards it could reap, as taking out the crew of a ship and leaving their ship intact is far more profitable than a destroyed ship.
Boarding can be done through various ways, but are usually done through small boarding pods that are shot towards the hull of the enemy ship. These boarding pods can hold people or drones and will stick on the the side of a hull, slowly cutting a hole into it so the intruder can enter the ship, turning a ship battle into a ground battle. Boarding pods can be relatively dangerous to use; it can sometimes be difficult to hit an enemy ship if they maneuver out of the way, and if they have point defense systems it can be lethal to the boardee. So sometimes, it may be beneficial to attempt boarding after the target is unable to move their ship.
In some cases, boarding has been accomplished through sophisticated hacking of a ship's teleporter systems, allowing intruders to simply generate a teleporter code for themselves and teleport into the ship with it. However, boarding in this way is difficult to do.