You can use a USB 3 device in a USB 2 socket, but it will be limited to USB 2 speeds.
USB 3 is much faster (10x) than USB 2, it has the same 4 pins as USB 2 and a set of extra pins for USB 3, but in the same physical form factor (the plugs are the same)
You can use a USB 2 device in a USB 3 socket, and vice versa quite happily. But you'll be speed limited in both scenarios.
Additionally, the USB 2 spec dictates that a single device cannot draw more than 500ma, for USB 3 this is increased to 900ma. For self-powered devices or very small devices like pendrives this isn't a issue - but is a significant benefit for larger devices like external hard drives, or for charging other devices.