This is something I've never had to think about, so I can't offer firsthand experience, but a quick search of the CF archives
came up with this article
from noonsite.com. Here's an excerpt...
The captain must report the arrival of the yacht to Customs immediately and make formal entry within 24 hours. On arrival everyone must remain on board, except for the captain going ashore to report the arrival of the yacht. Documents needed include registration papers, a declaration of both ship's stores and crew's possessions, last port clearance, and a crew list. Clearance must be completed with Customs, Immigration, Health and Agriculture. Sometimes the Customs officer performs some or all of these other duties. On departure from the USA, yachts must clear out with Customs.
Foreign-flagged yachts (including Canadian ones, even if they are in possession of a CRUISING LICENCE, are required to notify Customs (Homeland Security) IMMEDIATELY when moving to a new berth, even if it is in the same port or face a possible $5,000 fine. See the USA reporting article for more information.
Also check our Documents page for more requirements.