The difference is lost in the mists of time. The earliest form of horse-drawn vehicle available for hire was called a 'cab' (short for cabriolet). The name stuck when cab firms upgraded to motorized vehicles, fitted with a 'taximeter' (which measured how far you'd gone). These were called 'taxi-cabs'. Nowadays either word is used.
Some users in the UK reserve the word 'taxi' for the diesel-engined ones with a high roof to the passenger compartment (also known as 'black cabs'), and use the term 'minicab' for standard passenger saloon cars that just happen to be available for hire. But most speakers don't make any such distinction.
b