It's a seemingly simple question with a somewhat complex explanation.
MIDI does not specify the actual sound to be played, only the information on what to do with the sound, like note, pitch, vibrato, etc, and which instrument to use, like piano. It is up to the playback device to decide what the sound to be played actually sounds like.
General MIDI is the most basic set of information a MIDI device must support to be classified as a MIDI device. The MIDI standards were developed a "long time ago" (early 1980's).
Sometime afterwards (later 80's) Yamaha and Roland wanted additional features for their devices, and as such, each developed their own extensions to the MIDI standard. Yamaha made XG, and Roland made GS. Both provide many more available instruments and variations of instruments than the original General MIDI.
Devices that support more than one standard, like your Yamaha keyboard, usually have a "standard sound set" (called a bank). It is usually a basic set. Then better/alternate sound sets can be accessed/used by selecting the sound sets from in the device (or from in a MIDI file).
GM is limited to 128 instrument sounds (more if using the General MIDI 1 Level 2 standard [GM2, not to be confused with the new MIDI 2.0 specification currently in development]) and... ummm, I forget how many percussion sounds. All GM devices should support these sounds, accessed the same way between all devices.
The XG and GS extensions add tons of extra sounds and variations, but are only supported by devices specifically designed to support them, and they use different methods of bank selection to access these extra sounds and sound modifications.
You can hear some of the differences by using a MIDI player on a computer, where you can select from a massive array of sound banks to play back your files.
I personally have quite a few different sound sets (in the sF2 soundfont format) on my PC to play back my files either as realistic sounding instruments or as a variety of older sound chips, including Nintendo NES and SNES, Sega Genesis, OPL3 (old Soundblaster PC sound card), and even specifically the Yamaha SYXG50. Each one of these has a completely different sound from the others, and each one is General MIDI compliant. The actual MIDI files are tiny and only tell it what to do, not what the sounds are. It is up to my MIDI player to provide these sounds.