Sustain pedal is used many ways on any keyboard. Examples include

A. tonality/color
1. a line with sustain is very different then without
2. adding roundness to a hard strike

B. connecting a line of chords:
1. hold down keys
2. press down sustain
3. release keys
4. press next keys and immediately release sustain

The timing of the release of sustain takes practice. The net result is a line of chords without any break of sound in-between chords and without sustaining notes beyond each chord.

C. Technical trickery on electronic keyboards: Using sustain to hold down a note(s) while changing settings.