Sustain and Sostenuto are not the same.
You'd use sustain as you would on a piano, and when held down, the note(s) will sustain for the natural length of the sound. You can apply sustain you any sound, but it's best used solely on voices that CAN actually sustain, or have a natural sustain element. Pianos, electric pianos, some of the guitars, some percussions like Vibes etc. Sustain on a trumpet is pretty odd, to say the least! One exception is strings, where adding a dash of sustain can add the 'cascading' effects used by orchestras such as Mantovani and James Last.
Sostenuto is a 'hold' function, some keyboards actually call it that. I use it when splitting the right side of the keyboard. I might have a Sax on the left side of the split, and hold a note with the pedal, allowing me to fill in with some brass on the right hand side. Can be very useful, giving you and extra 'hand'.