What is the difference between Bluetooth and WiFi ?

bluetooth mini keyboards - bluetooth vs wifiBluetooth is used for short distance wireless connections through a radio signal scattered in different frecuencies which makes it more resilient against interference. Transmit power is very low, ideal for small devices like bluetooth mini keyboards. 

Bluetooth is ideal for embedding in small devices: it's a "single chip solution", self-contained in a very small chip, which can be accomodated in a very small space.

 Bluetooth has no need for a noticeable antenna (usually the bluetooth chip itself suffices - or eventually a very small copper thread in the circuit itself is enough). 

On the data layer side, bluetooth was designed with the concept of devices and services profiling included from scratch, so bluetooth solutions includes managment of security, passcodes, and transmission of audio and data for specific scenarios, like bluetooth mini keyboards, bluetooth audio devices, bluetooth mices, etc.

Wifi on the other side uses more power (actually, far more power) to transmit and thus needs a specific antenna to dissipate such power as radio waves. You cannot operate a wifi device (like a wireless router) without an antenna (or the correct antenna) because you will end up with a burned out wifi device, as the transmit power will have no way to radiate as radio waves and will heat up the device until it breaks down. Even those routers that don't have any antennas popping out of their casing, got them inside !

With wifi's power and dedicated antennas comes a better coping of distances and also transmission speed is magnitudes better than the speed that a bluetooth device can handle.  On the other hand, transmission occurrs in narrow frecuencies, or channels. There are 12 different channels available for Wifi use in the United States.  Wifi connections over the same channel might interfere between them is there are close enough,  but not from the same network.

For example, if both you and your neighbour uses wifi routers in your homes a wifi router, and both, by chance,  set each router to use the same wifi channel,  given that both of you are in close proximity (adyascent apartments might be a typical case), then you both will suffer from intermitent connections and low speed datda transfers.

On the data layer side, wifi is used as a mean to create a wireless network bridge between devices and nothing else.