Ok, stupid question

I'm old 8 bit and Amiga classic user...and I've played plenty of mods, but could someone please explain how mods actually work and why they are so great? I confess I'm ignorant of the difference between a mod and midi file.
I do remember at some point creating mods and writing a simple game make a call to a prepackaged mod (I think) which would cause the music to step through with each interrupt cycle... my memory is hazy so that may not be correct.