A submarine is a watercraft that can operate independently below water, as distinct from a submersible that has only limited underwater capability.
The term submarine most commonly refers to large manned autonomous vessels, however historically or more casually, submarine can also refer to medium sized or smaller vessels, (midget submarines, wet subs), Remotely Operated Vehicles or robots.
The word submarine was originally an adjective meaning "under the sea", and so consequently other uses such as "submarine engineering" or "submarine cable" may not actually refer to submarines at all. Submarine was shortened from the term "submarine boat".
Submarines are referred to as "boats" for historical reasons because vessels deployed from a ship are referred to as boats.
The first submarines were launched in such a manner. The English term U-Boat for a German submarine comes from the German word for submarine, U-Boot, itself an abbreviation for Unterseeboot ("undersea boat").