It is a repeating section of a piece of music. In other words, it is a sound that is repeated continuously. The length varies from a few seconds to several minutes.
Loops started being used in the 50’s-60’s. And in the early 90’s, digital devices were invented specifically to allow musicians to use live looping like Ed Sheeran does, for instance.
A loop can be created by different technical means such as turntables, digital samplers, synthesizers, sequencers, drum machines, tape machines and delay units. It can also be programmed using a computer music software.
Interesting fact: an mp3 can’t be looped because of additional data stored at the start of the file that creates an audible gap.