Beyond the morally dubious issue of recording someone’s webcam without seeking their consent first, there are basically two ways of recording a webcam stream: screen recorders, and messenger client recorders. Let’s look at both in turns.
Screen recorders capture everything that is on your computer screen, together with sound. They are often used to make video presentations for instance, but they can equally record webcams, and their associated associated sound stream.
The main problem with screen recorders however, is that they do not capture the video stream directly, but rather copy the pixels displayed on your screen. Consequently, unless your computer has a good frame rate, screen recorders can produce slightly jerky and laggy results. They are the only way to record from websites such as omegle and chatroulette however, unless you want to record skype messenger.
Some good, cheap, paid screen recorders include the icecream screen recorder, the movavi screen recorder, and at the other range of the price spectrum: camtasia, a professional but expensive software suite.
An excellent free alternative to these is Camstudio, an open source screen recorder that does the job perfectly.
Messenger client recorders
Skype: Eaver records native skype video and audio streams. As much, the quality will be better than a general screen recorder, though it obviously will only work with skype. A free alternative which seems to be popular, but which I haven’t personally tried is the ifree skype recorder.
Yahoo: for those of you still using yahoo messenger, Eatcam recorder pro does the job. There is a free version available, but it displays a watermark on your recording. For a free alternative, try the Apowersoft yahoo recorder.