Data (files etc.) typically compressed using simple schemes such as Run Length encoding, or statistically based Huffman codes or dictionary based substitutional schemes such as the Lempel-Ziv algorithms. Audio and Video are loss tolerant, so can use cleverer compression that discards some information. Compression of 400 times is possible on video - useful given the base uncompressed data rate of a 25 fps CCIR 601 image is 140Mbps.4.2 A lot of standards for this now including schemes based on PCM, such as ADPCM, or on models such as LPC, and MPEG Audio. Note that lossy compression of audio and video is not acceptable to some classes of user (e.g. radiologist, or air traffic controller).
It is sometimes said that ``the eye integrates while the ear differentiates''. What is meant by this is that the eye responds to stronger signals or higher frequencies with cumulative reaction, while the ear responds less and less (i..e to double the pitch, you have to double the frequency - so we hear a logarithmic scale as linear, and to double the loudness, you have to increase the power exponentially too).
A video CODEC can be anything from the simplest A2D device, through to something that does picture pre-processing, and even has network adapters build into it (i.e. a videophone!). A CODEC usually does most of its work in hardware, but there is no reason not to implement everything (except the a2d capture:-), in software on a reasonably fast processor.
The most expensive and complex component of a CODEC is the compression/decompression part. There are a number of international standards, as well as any number of proprietary compression techniques for video.