It's essentially just using MIDI as a universal switching signal, in the same way an amp's footswitch sends a switching signal (though MIDI is digital, and thus can be assigned to control an almost limitless amount of things). Basically, you have your amp, which probably doesn't have a built-in MIDI interface, so you also have an external MIDI switcher (like
this baby) that receives MIDI signals and sends switching signals to your amp. You also have your rack FX processor with its MIDI inputs, or, if you're a die-hard pedal user, a MIDI-controllable loop selector (such as
this) which allows you to place your pedal(s) within its loops and turn them on/off.
So basically, all this stuff has a MIDI input and a MIDI "thru" output that just sends the same signal out for the purposes of daisy chaining. Connect it all together, set everything up how you want it, then activate the "learn" (or equivalent) function on all the MIDI stuff, and then hit a button on your MIDI foot controller, and bam - you've got a preset. Set everything up differently, learn, different button, repeat! And you can also have it all automatically controlled by a laptop or sequencer sending out MIDI signals, though that's a little beyond my know-how...