As a noun, a sequence is a list of digital commands or files, normally MIDI, samples, or audio files placed in a specific order within a hardware or software sequencer with the intention of being played back in a specific order to create a song or musical composition. As a verb, sequence is the act of placing the MIDI commands or audio files in an orderly fashion for playback through a sequencer.
Technically, a player piano’s piano roll would be the one of the first instances of a sequence, as the piano notes were triggered by the small holes in the roll. Except for the fact that most sequences are assembled digitally today, little has changed; a sequence is still a list of commands telling a device what to do or what to play.