1. A car for hire: taxi, taxicab.
2. The enclosed part of a train, truck, or crane where the operator sits.
In the 1700s the French started using a type of small, two-wheel passenger cart, pulled by a single horse. They were small and fast, and notably, they had good springs. This type of cart was called a cabriolet, literally, a 'little leaper'. The design quickly moved into England, where the term 'cabriolet' was eventually shortened to 'cab' (the first recorded usage of the word was in 1826). 'Cab' came to mean any type of two-wheeled cart, generally with room for one or two passengers and the driver, who often stood or sat on a platform behind the seat. This type of design was also called a fly, gig, or chaise, although there are a number of terms that were used for other types of cabs. One of the best known is the hansom cab, although even better known may be the hackney cab, which simply meant a cab for hire.
Eventually we developed motorized vehicles to replace the horse-drawn cabs, but 'hackney cab' remained as a common term for these cars. Against all logic, the English dropped the 'hackney' and kept the 'cab', often referred to as a 'black cab' ('cus London taxis were black). In 1907 Wilhelm Bruhn invented the taximeter, a cunning device to record the distance traveled, and these 'taximeter cabs' were quickly dubbed taxicabs.
Today we use 'cab' to refer to a car for hire, but we also use it to refer to the part of a train or tractor where the operator sits. This sense may be a shortening of cabin, but surprisingly, most dictionaries believe that this kind of cab is also named after the cabriolet, presumably because it has seating for only one or two passengers.