If you are entering the EU for the first time from a non-EU state in a non-EU vessel with non-EU crew you will need to check in. Your permitted length of stay will depend on your nationality/nationalities. There may also be requirements on the vessel, eg to pay VAT.
If you are EU citizens entering EU waters (from non-EU_ on an EU boat, some countries may require some declaration from you. A key further definition is whether the country in question is Schengen, which is a further, smaller group of countries who have done away with most border controls between them.
Once in EU waters and within Schengen an EU registered vessel with EU registered citizens aboard has freedom of movement. If you move outside Schengen, eg to the UK, there will be some further check in required.
In practical terms, as a UK registered vessel in Italy, Spain
no-one has asked to see anything but our Ships Registration
and (in some marinas) our insurance documentation
. In Portugal
they have occasionally asked for passports. In Morocco
, at every port, it is registration
, and passports. For Italy specifically the only paper anyone ahs asked for is the Ship's Registration.