Today, we call the right side of a ship or boat the starboard side and the other side is the port side. These terms have been in use for a very long time. This is a case of the words being very logical, though.
The ancient sailors had boats that were steered with a rudder, much like many modern ships do. The control for that rudder was located on the right side of the ship. The apparatus that controlled the rudder is the tiller, and this was secured to the wood on that side of the craft. In order to steer the boat, a sailor would walk to the steer-board in order to control the till. Starboard is a corruption of steer-board. (Think of saying ‘steer-board’ with a pirate voice.)
That explains starboard, but what about port for the left side? Since the rudder and till were located on the steer-board (starboard) side of the ship, when a ship docked, the ship had to dock on the left side. If it didn’t, there was a likelihood of the till and rudder getting damaged. That means that when a ship came into port, they approached and tied off the left side of the ship to the dock, so this logically was the port side of the ship.
It is all quite logical and it had to do with steering the boat.