What you have asked is the subject of many books. The best ones for the sea are put out by Gerry Cunningham. I would recommend buying them, reading them 2 or 3 times and then return with specific questions.
I spent 2 years in the Sea on a boat, including summers and it is beautiful.