How did Balboa get to Panama?

he decided to stow away with his dog on board a relief supply ship sailing to San Sabastian on the Isthmus of Panama in 1510