In the Japanese tradition of copying Germany, Canon used a Leica M39 screw mount on their rangefinder cameras.
The R Mount
In 1959, Canon introduced the Canonflex 35mm slr. It used the R mount. The R mount was a breech lock mount. What is a breech lock mount? Simple. The lens sits against the camera body and you turn a collar at the base of the lens to fasten the lens to the camera. You don't turn the lens itself. The collar acts as a locking ring.
In 1980, Canon ditched the breech lock collar. They also removed the stop down lock. These lenses mount like a bayonet mount lens. They are usable on FL mount bodies but not R mount bodies.
1986. Canon added the EF mount autofocus lens to its lineup. The EF mount has nothing in common with any previous Canon mount. Canon manual focus lenses can not be used on autofocus bodies without a very expensive and super rare adapter and it was good for telephoto lenses only. So, unlike Nikon, Canon required its customers to buy new lenses with their new AF cameras. The EF mount has CPU contacts and an internal focus motor. One characteristic of this mount has proven to be very helpful today. The EF mount is quite wide. This makes it possible for other lens mounts to be adapted to it quite easily.
With mirrorless digital cameras we see smaller lenses with smaller mounts. The EF-M mount is much smaller then EF or EF-S mounts. It is specifically designed for Eos M cameras.
Canon, like many brands, is embracing mirrorless technology. Their new RF mount full frame cameras are being marketed as you read this. The RF mount is as wide as an EF mount but the flange distance is as short as an EF-M mount. It is essentially a marriage between the two systems.