A sample is a digital snapshot of an analog signal at a given point in time. All digital audio files, and some digital video files, consist of sampled analog signals. When all a signal's samples are combined, they can recreate a close approximation of the original signal.
Computers use a component called an analog-to-digital converter (ADC) to analyze analog signals and convert them into digital signals that can be stored and edited on a computer. An ADC captures samples at a sample rate appropriate for the type of signal — several times a second for video (depending on the video's frame rate) to thousands of times per second for audio signals. It quantizes each sample to convert the analog value to a close digital approximation.
A sample's bit rate determines how accurately it represents the original signal. A higher bit rate permits a larger range of possible values for each sample and allows subtler changes between them. For example, an audio signal sampled at 16 bits per sample allows each sample to cover 65,536 possible amplitude values; a signal sampled at 24 bits per sample could instead represent 16,777,216 possible values.
NOTE: The word "sample" may also refer to a short audio clip that software or hardware can play when triggered. For example, a synthesizer keyboard may include a sample of a bird chirp sound that plays when you press a specific key.