Why can the Leonardo act as a mouse or keyboard but the UNO can't?

I have been using an Arduino Leonardo for a while now but never quite understood why it can communicate/ act as a mouse or keyboard and the UNO can't.

The processors built in USB communication eliminates the need for a secondary processor.

I never quite understood this? Can anyone explain?

The ATmega32u4 processor used in the Leonardo and Micro has built-in USB support, making it relatively easy for the chip to act as a USB device. The ATmega328P used in the Arduino UNO doesn't have built-in USB support so it has to be done in software. It is possible but not easy. See: https://www.obdev.at/products/vusb/index.html A third option is to re-program the ATmega16u2 used on the Arduino UNO as a USB-to-Serial chip to act as the USB device.

i have a question regarding thins topic johnwasser, Does the UNO support serial communications ?! I mean sending data from computer to Arduino and vice versa from Arduino to computer for data acquisition throw the USB cable ?