Sampling is generally defined as the art of taking a portion or sample of an existing audio recording, and re-using it in a new recording. A large proportion of todays music uses sampling in one form or another - examples include sampled drum hits, loops, vocal phrases and short instrumental stabs. Anything at all can be sampled (copyright restrictions not withstanding!), and results really are only limited by imagination.
Traditionally, sampling was done with a dedicated hardware device, or a sampler built into another instrument such as a keyboard or groovebox. Today though, its more common to use a software sampler in a DAW environment. Whichever method is used, the basic principles of sampling are the same. Firstly, the source material to be sampled is recorded into the sampler. Its common practice to record a greater length of material than needed, and then to use the tools provided to accurately trim the start and end points. This is often achieved using a graphic display of the waveform which gives fine and accurate control. Its good practice to set the trim points at zero crossings (where the waveform crosses the axis) as this reduces unwanted clicks. Finally, when the samples have been created, trimmed and saved, they can be assigned to different MIDI notes (key-mapping) ready to be used.
Some musicians spend weeks or even months creating and manipulating samples ready for use in their own compositions, however the use of pre-prepared sample libraries is much more convenient. Fortunately, there are literally thousands of royalty-free sample libraries available with a massive choice of instruments and styles suitable for all kinds of music. Royalty-free here means that your purchase of the product constitutes a licence for your free use, and with the exception of using the sounds to create your own sample library, youll never have to pay royalties to the producers.