Could someone kindly clarify for me the difference between a style and a midi?

Is a style just the backing, for you to play the melody on top? So the style would last the length of one song? And the midi being the full song in its various parts.

Would the style set all the instruements including that for the melody?