Having smashed open many Playstation controllers as a kid, I have seen the bits of a lot. There is a motor on either side of the controller. This motor has a weight attached to it that is not even. By this i mean 1 side of it has more weight than the other. When the motor spins, the unevenness of the weight causes the controller to vibrate. It is a pretty simple idea and works quite well. This image will show you the inside of a dualshock controller and you can see the 2 motors here.