OK, heres what you should do. To record from the audio playing in your system, you must use the "Sereo Mix" device. Right click on the speaker icon in the system tray and choose Recording devices. In the dialog that opens up, there is a list of audio recording devices. There must be a mic device, a line in device at least. If stereo mix is not visible, right click on the list of devices, in the empty space somewhere and choose "show disconnected device" and "show disabled devices". This should show up Stereo Mix device besides many others like Aux etc. Now right click the streo mix device and choose Enable and then again choose "Set as default device". Now you are ready to go. Check the device's volume level and other properties by double clicking it. Then click OK to close the dialog.
Open up any recording program, for example, i use Audacity. Choose the stereo mix device for recording, whereever it is present. For Audacity its on the main interface as well as in the preferences menu.
I hope this will solve your query. Cheers!