Isn't my context associate with frequency? As it is a PWM... 5V 0V 5V 0V 5V 0V
PWM is a mixture of AC and DC. The AC part comes from it switching between 0V and 5V and back rapidly. The DC part comes from it only ever being positive, not negative. It could instead for example switch between -2.5V and +2.5V. From an AC point of view that's exactly the same, but from a DC point of view it's not as half way between -2.5V and + 2.5V is 0V, whereas half way between 0V and 5V is 2.5V. The AC part doesn't care, if the frequency is the same and the amplitude is the same then as far as AC and a filter is concerned there is no difference. The fact that one will give 0V as the output and the other will give 2.5V is down to the average DC level going in*.
If that doesn't make sense then, sorry, I can't think of a better way to explain it.
*I have assumed PWM set at 50% for this, setting it at a different ratio will give a different DC output as you know, but that's adding complication.