A music sampler is used for grabbing soundbytes of audio from many sources and manipulating them as you want. A sampler can be a stand alone unit, a keyboard with onboard sampling or a piece of software for a computer.
Music samplers all process the audio and enable you to play around with it to get a particular sound. It's well worth remembering that sampling other artists work may require copyright clearance and usually this involves parting with money for every piece you use.