This advice is general in nature and not intended to take the place of legal advice. You should seek legal advice before entering into a contract with publishers and master owners. Further, keep in mind that the specifics of your own circumstance may be different.
If you use a sample in your music, you must receive sample clearance before you can release it for sale - or at least, you should. Most record labels won't touch a record with uncleared samples, and even if you are going the DIY route, failing to clear the samples you use leaves you open to considerable legal trouble.
Clearing music samples is an absolute must, but it is not always the easiest process in the world. There are two parties you have to deal with: the owner of the master and the publisher. Samples are not subject to compulsory licenses, which means that either party can deny your use of the sample - and you need them both on board to legally use your sample.
Before you can get sample clearance, you have to record the song, so the record label that owns the master and publisher can see how you plan to use it. Not only do they simply want to make sure they are ok with the song, they also want to see how much you use the original recording. This helps them determine the price they will charge you for using the recording.
In terms of pricing, the owners and publishers have pretty free reign to charge you what they want. The label/master owner will usually want an advance plus a royalty on all sales. The publisher will want partial ownership of the copyright plus royalties for the songwriter and publishing money. The share you have to give to the publisher could be significant - according to attorney Donald S. Passman, author of All You Need To Know About The Music Business, you could be asked to give up more than 50% to the publisher, depending on how you use the original track.
Keep in mind that if your song has more than one sample on it, you have to repeat this process for each - even if you think you have altered the sample so much that it is no longer identifiable as the original track. It can be a tedious and expensive process - but not nearly as expensive as getting busted for copyright violation. Don't risk it.