Sampling doesn't record information about frequency, at least not
directly. It is taking snapshots of the sound's amplitude (voltage) at
regular intervals (the sample rate).
A good analogy is the price of a stock. Every day after the market
closes, you can look up your favorite stock in the newspaper. If the
stock fluctuated during the day, you won't be able to tell from the
paper, but if you take the numbers from every day and graph them, you
can get a long-term trend graph. You would be sampling the stock at a
sample rate of 1 sample per day.
Audio samplers do the same thing, at sample rates anywhere (usually)
from 20 kHz to 48 kHz (thousands of samples per second). It's not
unusual to see sample rates much faster than that now with computer
recording gear. The resulting stream of numbers can be reconstructed
just like a stock graph for playback. You just have to put it in a file
for the sample player to use.
To store this sample data into a useful file, you usually want to add
some kind of information about the data itself, including the sample
rate, number of channels (is it mono, stereo, etc), the original note
that was being sampled, how long it is, and how many bits make up each
sample point. This information is usually stored in the "header" part
of the file. Then the data itself is broken into chunks, but simply to
make it easier to load into the sampler. Disk drives and CDROMs have an
easier time dealing with blocks of data than continuous streams.
More advanced samplers can employ more advanced techniques. For
instance, when sampling a chromatic instrument like a piano, you get
better results if you sample many keys (or even all of them, multiple
times), than if you just sample one key and stretch it to cover all 88
notes. This adds to the complexity of the file but uses the same basic
There has got to be a good page on howstuffworks with illustrations and