Playing the Right Hand Sustain Pedal
It is probably the closest description to say that this can be used in two ways, the most obvious being when vamping with alternate note and higher chord as left hand accompaniment. The pedal goes down in a four in a bar on the first beat, then up and down again in time for the third beat.
It can also be used, in more serious forms of playing to create a pleasant legato between ensuing notes by joining them up, stopping the dampers from coming down after the keys are released.
The down/up motion is best replaced for this by an up/down foot the moment a second note or chord is played. Thus there is a tiny fraction of a second when both are played together, but not long enough to be noticed. The effect is that one blends into the other.
Playing with the Sustain Pedal
Adding the Sostenuto (Middle) Pedal
The sostenuto pedal also lifts the dampers to allow the strings to sing out even when the keys of the piano or released.
However it only controls the notes being held down while it is actually pressed down. It releases those too of course when no longer held down.
The video below has both pedals being used independently giving great freedom of texture of the sound.