Audio Hijack, SoundFlower or Wiretap Studio are three apps that will do the job for you.
Of the three, only SoundFlower is free. You will find it Here
It would help us give you a better answer if you were to tell us what OS, and version, you were using and what computer you have. (See the red Note at the top of each post)
Is there an easy way to record what I am hearing on the Internet?