One day in 1957, six-year-old Steve Stein was sitting with his mother in a Chinese restaurant in Mount Vernon, New York, when a record came on the jukebox that would ignite a lifelong passion for making familiar music sound fresh and strange. It was a single called The Flying Saucer by a pair of enterprising pranksters called Dickie Goodman and Bill Buchanan. Using a reel-to-reel tape recorder, they had constructed a spoof narrative about a UFO landing in Times Square, creating dialogue by taking lines from rock'n'roll records. It sold a million copies and prompted an industry lawsuit citing no fewer than 19 copyright infringements, thus making Goodman and Buchanan trailblazers not just in the field of sampling, but in the field of sampling-related litigation.

The kid, who would later become a pivotal figure in the history of sampling under the name Steinski, was impressed. "I still remember hearing it and thinking: What the hell is this?," says Stein. "I thought: Damn, that's really crazy. That's really cool."

Twenty-six years later, Stein, by then a Madison Avenue copywriter, entered a competition to remix a single on hip-hop label Tommy Boy. With sound engineer Douglas Di Franco, aka Double Dee, Stein spent 14 hours creating Lesson 1: The Payoff Mix, a playful, wildly imaginative collage that made bed-fellows of Little Richard, Grandmaster Flash, Humphrey Bogart and former New York mayor Fiorello La Guardia. It was really crazy. It was really cool. It won the contest, set a new benchmark for sampling and influenced generations of producers from Coldcut and M/A/R/R/S to DJ Shadow and the Avalanches.

Double Dee & Steinski made four more mixes together, themed around James Brown, or jazz, or classic hip-hop breakbeats, and Steinski has been producing records on and off ever since. None of them, however, could be officially released. For years, they circulated under the radar, but now a compilation of his work, What Does It All Mean?, has appeared on Illegal Art, a copyright-challenging US label run by a mysterious character who calls himself Philo T Farnsworth, after the inventor of the first totally electronic television. The same label is home to one of Steinski's spiritual heirs, Girl Talk, whose albums smash together fragments of famous pop records at bewildering speed, earning rave reviews from critics and remix offers from the likes of Beck and Peter, Bjorn & John.

The art of sampling has always kept lawyers busy. During the late 1980s, albums such as De La Soul's 3 Feet High and Rising and the Beastie Boys' Paul's Boutique looted pop's toy chest for booty and assembled their findings with breathtaking ingenuity and a cavalier disregard for copyright. But it couldn't last. In a landmark 1991 case, singer-songwriter Gilbert O'Sullivan successfully sued rapper Biz Markie over an unlicensed sample of his hit Alone Again (Naturally), and the free-for-all was over. Cautious hip-hop producers now base tracks on just one or two cleared samples, while prolific samplers such as DJ Shadow and the Avalanches root through charity-shop bins for obscure source material that won't incur punitive licensing costs.

But there is a school of sampling that makes illegality a point of principle. In 1985, Canadian sound artist John Oswald coined the word "plunderphonics" to describe the art of flagrant sampling. "Taking Madonna singing Like a Virgin and rerecording it backwards or slower is plunderphonics, as long as you can reasonably recognise the source," he explained. "The plundering has to be blatant." He summed up his philosophy thus: "If creativity is a field,copyright is the fence."

The spirit of plunderphonics spread to the likes of San Francisco's Negativland, who incurred the wrath of U2's label with their parodic U2 EP; the KLF (Kopyright Liberation Front), whose sample-stuffed debut album was binned after a legal battle with ABBA; Gnarls Barkley's Danger Mouse, who received a cease-and-desist order after combining Jay-Z and the Beatles on The Grey Album; and mash-up producers such as Freelance Hellraiser and Richard X, both of whom have since gone legit. In each case, blatancy is the point. Steinski sampled legendary newscaster Walter Cronkite's coverage of the murder of John F Kennedy on his 1987 record The Motorcade Sped On. CBS refused to license the clips: "I called this guy and described what I wanted to do and he gave a little snort and said, 'There's no way in hell that we'll clear that.' And he just hung up." But Steinski pressed ahead with the Cronkite option because "you want the thing; you don't want the almost-thing".

Wanting "the thing" is fundamental to Girl Talk, aka 26-year-old Gregg Gillis. "I was taking a Warhol approach," he says. "I didn't want to go crate-digging, searching for the obscure sample." If you knew nothing of pop history and heard devoted crate-digger DJ Shadow's Endtroducing album, you would still get out of it everything that Shadow intended to convey, but much of the pleasure of Girl Talk's records stems from recognition. "I always wanted to use recognisable elements and play with people's emotional, nostalgic connections with these songs," says Gillis. "For me the biggest challenge is to make transformative new music out of these huge musical parts that anyone can recognise." Gillis's breakneck sampling makes a case for the common language of pop. By splicing Elton John with the Notorious BIG, or Jay-Z with Radiohead, he celebrates the curious democracy of the Top 40 world. "It's a fun game of running through the forest of the history of pop music."

Of course, to make that point requires plundering records so famous that he could never clear them all. "To pay every artist on the record I'd probably have to sell each album for a few hundred pounds. When I started doing this music I wasn't intending to be an outlaw - I just liked sample-based music. Every band is rehashing ideas from the past, and you can use a sampler or computer as an instrument. To me that's no different from the Rolling Stones being influenced by classic blues guitarists. I feel that it should be legal."

Stein, too, would be legit in an ideal world. "If the money and the means had been there I would have done it legally," he says. "Being a romantic copyright criminal is interesting considering the fact I've led a rather sheltered life. To the extent that I feel that I have any purpose on earth it's to make these goddamn records. That it's against the law is completely off to one side."

Whether these records really are against the law is some-thing of a grey area. When Dickie Goodman and Bill Buchanan were sued a second time in 1957, a judge decided that their records fell under the principle of "fair use", because they had "created a new work". Conceived as a defence of free speech, fair use in the US allows unauthorised use of copy-righted material if it is "transformative", such as a quote from a book in a review, or an artistic parody, and therefore sufficiently different as not to hurt sales of the original work. Gillis insists his albums are transformative - if anything, his albums stimulate interest in the original songs - but fair use is a nebulous concept subject to the discretion of individual judges. Current copyright law does not officially recognise the art of sampling.

That may change. Last year, much to his surprise, Gillis found himself being mentioned in Congress. Representative Mike Doyle, who represents Gillis's hometown of Pittsburgh, brought up Girl Talk during a House of Representatives subcommittee hearing on the future of radio. "Maybe mash-ups are transformative new art that expands the consumers' experience and doesn't compete with what an artist has made available on iTunes or at the CD store," he suggested.

A measure of the record industry's apparent change of heart is the fact that, despite Girl Talk's new album being described by the New York Times as "a lawsuit waiting to happen", neither his record nor Steinski's have been the subject of legal action. There is a strong, practical reason for this reluctance to sue. In an era of file sharing, YouTube and freely available remix software, pursuing individual producers for copyright infringement would be like patching up hairline cracks in a dam that already has gaping holes in it. "Technology has absolutely blown this thing out of the tub," says Stein. "When some cat with a laptop can take all the music he wants, mix it up, post it on YouTube and then go to school, then they're not going to have much luck [suing]." But it's worth noting that if the internet currently enjoys the exhilarating freedom of 80s hip-hop, then it's possible that an equivalent of the Biz Markie ruling might one day bring the shutters clanging down.

What does it all mean? It means that every internet user can now access the technology, if not the imagination, necessary to be a Steinski or a Girl Talk. More and more consumers of art have the means and, they believe, the right to become active participants in it, by recontextualising songs or images. In 1986, critic Robert Christgau described Steinski as "a perpetually disillusioned optimist who still assumes that the sounds and images rippling through the American consciousness are, forget copyright, every American's birthright - that we're all free to interpret and manipulate them as we choose." Back then, Steinski and John Oswald were, their different ways, fighting a lonely fight. In 2008, they have a lot of company.

• What Does It All Mean?: 1983-2006 Retrospective by Steinski and Feed the Animals by Girl Talk are out now on Illegal Art