[all variants] how can I make Audacity record both Mic (input) and Headphone (output) audio?

view story

http://ubuntuforums.org – Hello, With a click of the record button in Audacity, I can record all the sounds that enter my microphone (my voice). But Audacity is not recording the other person's voice (earphone/headphone). How can I make that happen? (Hardware)