ADC for recording, low-pass filter (anti-aliasing filter) before ADC, and amplifier circuit if the signal is weak.
Play DAC or PWM mode, and adjust the volume with amplifier circuit. In order to improve the sound quality, a low-pass filter can be used to filter out the noise.
Pc, recording and playing with sound card, integrates the above circuits.
Handheld devices such as mobile phones, palmtop computers and mp3 players integrate the above circuits.