Sampling is not a new phenomenon. Though it peaked in the 1980s, many popular songs today get their start with samples. But as the years have gone by, copyright law has tightened management of sampling.
Thus, sampling sometimes stands on the line between legal and illegal. In gray areas like this, it is important to understand what is and is not O.K.
Sampling is legal, but you must do it right
The first thing to note is that sampling is perfectly legal, as long as you approach it in the proper way. You cannot just grab songs at random to sample and use it in a for-profit piece, citing open creative use. In general, you must get the owner of the recording and the owner of its copyright to agree to let you sample their music. And get everything in writing. You need a mechanical license, too, which you can obtain through the appropriate agencies.
Derivative works versus sampling
If you plan on combining songs, you must get permission from all parties. As this is a derivative work, you need to get permission directly because a mechanical license is not enough. Provide as much information as possible. This includes how long the sample lasts, what section you want to sample, what you plan to use it for and what type of media you will use. Describe the timing of the recording and how many units you wish to create and distribute, too. This will improve your chances of gaining approval.