I would recommend you use the search function to learn about bringing alcohol on board. There have been several recent threads on the topic.
As far as buying alcohol in port, you might be able to sneak small amounts on board and take to your cabin (you go through a scanner and your bags get xrayed each time you embark). But generally they will take the booze away from and and deliver it back to your cabin the last night of your cruise..
Ditto for any alcohol purchased from the ship's store. Of course anything you buy at the bar you can consume right away