How to capture audio output/sound on a Mac

This is a good article on how to capture audio sound/output on a Mac, such as sound that's playing in a web browser. I don’t condone this for illegal activities, but I just captured some audio from a movie as part of a joke for a friend (after which I’ll delete the audio).