You've heard a story about a missing pirate ship in caverns somewhere under Anvil. Go to Dunbarrow Cove, which is marked on your map. You'll get a new journal entry. Swim over to Smuggler's Cave and go to the marked spot. Before you is a lost pirate ship, overrun by undead skeletons. You have to defeat them all before you own the place. When you're done with that, enter the Captain's Quarters and kill Cap'n Dugal, or what's become of him. Now you have to go to Dahlia Rakham, owner of the Sea Tub Clarabella in Anvil Docks, who can help you to upgrade your new hideout.
This time the upgrades are mostly NPCs for hire, swashbucklers and rascals who will serve in your newly formed pirate crew. You can hire two traders-fences here (you can sell stolen goods to them), three expert teachers (Security, Sneak, and Marksman), and also get some extra furniture for your cabin. When you buy it all, the quest will be over.
You're a captain now - you don't get to sail and rob for yourself, but you can send your crew on a raid and snatch your share of the profit when they're back (it takes them one full week to finish the procedure).