The ship's punk was chosen by lot, only the prior voyage's punk being exempt. Once chosen, that sailor's only duty was as cum bucket until the ship reached port again. He was to be available at any time for any crewman who desired to relieve his testicles of sperm build up. Generally, it was anal intercourse in such acts.
No particular emphasis on the title, though it was considered derogatory to be called the punk when it was not your turn. Since any man among the crew was in the lottery to become ship's punk, it was never wise to take insults or jokes about the punk too far. You never knew when the old punk was going to have a turn at the screwing the new punk.
To use the ship's punk did not make you homosexual in the modern sense. When in port, the majority of crewmen would happily make use of the prostitutes and women of the town. Considered a form of institutional/situational homosexuality only occurring during/in instances of enforced separation from women. It was also likely there were some bisexual and gay crewmen, just there are today.
The term 'punk' originates here, not with prisons, street slang, insult as an inferior male or with the music genre.
2) Crewman: You're the ship's punk, so prepare to be boarded.