The rear of a ship, or any marine vessel, is called the "stern." When someone on a boat is moving towards the stern, that person is going "aft." A boat going backwards is going "astern."
The front of a ship is called its "bow," and when someone on the vessel is moving towards its bow, that person is going "forward." When the ship itself is moving forward, it is going "ahead." The right side of the ship to someone on the ship facing the bow is called "starboard," while the left side is called "port." A ship moving "leeward" is going with the wind, while going "windward" means that it is moving against the wind.