What software is used to record interaction with the my computer?

I have seen this from time to time on YouTube where a software engineer or a graphic designer wants to record an instructional lesson, he can record this computer interaction for later playback.

How is this done?