The roots of music sampling predate the 1980s, when the hip hop scene first emerged. Some point to the fact that jazz musicians have always borrowed each other’s riffs. But the sampling of recorded music evolved out of sound collage that started decades earlier. Early sound pioneers experimented with the very definition of music. Pierre Schaeffer and Pierre Henry, for example, started their own movement of musique concrète when they began collaborating back in the 1940s. Before tape recorders were even around, they used disc cutters to push the boundaries of music by making unique sound collages. And by “sound,” we mean more than just instruments. They also used the sounds of trains and mechanical noises. Soon, other pioneers such as Karlheinz Stockhausen were influenced by Shaeffer. And later, even the Beatles dabbled in musique concrète with their experimental track “Revolution 9” from "The White Album."
In 1961, James Tenney took it one step further by taking an existing popular song and drastically manipulating it. His "Collage #1" took Elvis Presley's recording of "Blue Suede Shoes," clipped out portions, rearranged them and played with the tempo. A more mainstream, but less experimental and avant-garde, example of collage came from Dickie Goodman and Bill Buchanan in 1956. Their "Flying Saucer" was a playful mashup of rock and roll hits from the era along with a fake news report about aliens landing from outer space. This and other Goodman and Buchanan releases became popular, attracting some of the first copyright lawsuits related to sampling.
It was not until the late 1970s and early 80s that sampling really exploded with hip hop. This began when DJs started interacting with and manipulating the vinyl records they played. At first, it became popular to play and replay the breaks in funk music, simply because crowds loved to dance to these parts. Kool DJ Herc is credited with originating this practice, and others, like DJ Grandmaster Flash, helped perfect the techniques, such as changing turntable speeds and turning the records manually. He joined other rappers to form Grandmaster Flash and the Furious Five, and the group rose to national stardom with the 1980 single, "Freedom," which sampled "Get Up and Dance" by the rock band Freedom.
Hip hop and rap have relied heavily on the practice of sampling ever since, but you'll occasionally find examples of sampling in other genres. But legal issues have largely stifled its widespread use.