Multiple ways to accomplish it. The courses recommended above can be very helpful. Also, there are many captains who like to train so chartering with one of them or just getting some time with one can be very helpful.
As to Captain's license, if you've been on boats all your life then you likely have a good start toward the sea time. Depending on location of your time on boats and size of those boats, how it will apply to you. When we started we had plenty of sea time, just it was small boats and inland so only qualified us for inland and low tons at first. While a license is certainly not essential, you might find it an enjoyable and educational experience, although you'll still need hands on experience and training of some type. Now, the school we used does have an incredible simulation center they use for some advanced courses. One of the drawbacks often used on maritime school training is cost, but courses are available for $800 or so.
Now, an additional way to get some of the formal training (not the way we went) is online. There is actually a site online offering the training materials for free without the testing. So training, but no license unless you decide to pay.
I do have to warn that if you start Captain's training, I know at least two people who found it addictive and got carried away and keep getting more and more. I'm one and the other is beside me as I type.