Sounds are analogue - they are made of waves that travel through matter. People hear sounds when these waves physically vibrate their eardrums. Computers only understand digital information... 1s and 0s.
A sound card translates between a computer's digital information and the outside world's analogue information.
A microphone converts sound waves into voltage changes. If a microphone is plugged into a sound card then the changing voltage can be sampled at intervals (the sample rate) and each value converted into a binary number. This digitising of the sound is carried out by the Analogue to Digital Convertor (ADC) on the sound card and the series of binary numbers can be stored as a sound file.
The sound card can recreate the stored sound using a Digital to Analogue Convertor (DAC). This converts the series of binary numbers back into a changing voltage which can make a speaker (in a set of headphones or external speakers) vibrate to reproduce the sound.
E.g. 44.1KHz (Audio CD) = 44100 samples per second
Equivalent to approximately 10Mb / minute of audio (16 bit)
The more often the sound is sampled then the closer the match between the original analogue sound wave and the digitised version. However, higher sample rates need greater space on storage devices, need faster processors to manipulate the data and files will be slower to transfer over networks and the Internet.
Video showing data structures and how sound is sampled.