Enlist in merchant marine as swabee; make captain. How?

Back in the day I spoke to someone in the merchant marine, and asked him how it was, and he said he enlisted as an unrated seaman (swabbin the decks?) and made captain

How? Is this a good career move for the youth? Explain

Don’t you normally need certifications/licenses to be Captain of a licensed ship? Can you obtain these by self-study (culminating by taking a licensing exam when you’re ready), or by apprenticeship, or do you need classroom time?