@relaxing:
the RC filter is very simple, just like a power supply filter. When the putput pin is at +5, the cpacitor charges slower than normally through thee resistor, and the voltage across the cap rises. When the output goes low, the cap discharges into the output in through the resistor. Sort of like a shock absorber. If the values are right, the hard variations ( 90[ch730] rising and falling edge of PWM signal) will get flattened out. With just one RC, it won't be a totally smooth voltage, but it will be pretty good.
D