If a boarding is going badly for you, or you're boarded and you think you're going to lose, or even if you just don't want to be boarded right now, you can attempt to disengage. Disengaging takes four or five rounds, and I'm not sure what your penalties are while trying to do so. If you're successful, your ships drift apart and you may begin maneuvering to get clear.