Sound card
A typical sound input device is a microphone, connected to the red/pink jack socket. The sound wave is digitized and then it may be stored as a file using data compression algorithms which make the file smaller. Of course all of this is done under the control of some software.