PWM is widely used in electrotechnics for lights, chargers, motors, generating different signals, etc. which are all present in robots as well. In short, PWM is a way of expressing analog values in the digital world.
You have probably wondered how, in the digital world, we can use some other value than supply voltage – which is output value from our microcontrollers like Arduino. The solution for this is PWM, which is essentially a microcontroller turning the output pin on and off very fast so that, for example, rather than seeing LED blinking, our eyes see an average brightness of LED being on and off.