A boat, like a ship, is a buoyantvessel designed for the purpose of transporting people and possibly goods across water. A boat is usually smaller than a ship. Some boats are commonly carried by a ship or on land using trailers.
In rowing, a boat refers to the collection of people rowing a particular shell, which is the term applied to the actual vehicle. So a university might refer to its first boat, meaning the rowers who make up their best team, rather than their best piece of equipment.
A submarine is generally referred to as a boat rather than a ship.
A ship can be informally known as a boat, especially by its crew. This use is uncommon in the case of a warship.