Here is a nice article on what is Pulse Width Modulation: PWM
Basically, with PWM you can simulate a voltage by turning the pin on and off (HIGH and LOW, 5V and 0V) according to a certain frequency.
The amount of time in a cycle that the pin is on and off (duty cycle) determines the resulting voltage between the pin and the component.
On Arduino, PWM values are output with analogWrite() using values between 0 and 255.
P.S.: Here's another great article about PWM that you should read.