Relays are on/off devices (an electrically controlled switch).
PWM is on/off too, but it's faster than a mechanical relay can respond (and faster than your eye can detect).
How can this be done with a power relay?
Are you trying to dim/control AC power?
If you are switching DC, a solid state relay is usually fast enough for PWM. (You'd have to check the specs.) But if you are switching 50/60Hz AC power, there are special considerations and PWM will NOT work! Some AC relays won't turn-on except at the AC zero-crossing, and most will only turn-off at the zero-crossing.
If you are dimming AC power, you typically use something like PWM, but it's synchronized to the AC line frequency.