You need to enable Stereo Mix device in the Recordings tab of the Audio section in windows, then you can use any other application developed to record audio and that's it.
To enable Stereo Mix, install the latest updates for your Audio card and then go to the Recording section and right click in the empty area and check Show Disconnected and Disabled devices. Right click on Stereo Mix and enable it. This setting enables applications to get the audio playing in the speakers.
You can find a list with applications that record sounds from your PC.