Once you board your ship they will provide you with a room key/charge card/identification card. You will be required to present it when you debark the ship every time and then present it to reboard the ship on your return. Every port you are visiting will have machines (like they do at the airport) to screen everything you are carrying onto the ship.
Most ships attach a digital photo of you to the card so that when you reboard the security officer is looking at your picture to make sure it is you. In this way someone can't steal your card and then board the ship.