Virtually, all computers have the ability to output sounds, either via an internal speaker or, via 3.5mm, or USB connectors to headphones, external speakers and even hi-fi equipment.
To record sounds, you need either a microphone or a line in connection and software to capture the sound.