The easiest way is by using a screen capture software like Fraps. Most of them support by default automatic convertion into *.avi files where you can afterwards edit them using any Video Editing software out there (like Sony Vegas or Adobe Premiere).
There is also the HLAE solution which is very handy and will help you create your first movie in no time.
I like using the raw images for quality purposed though. If you leave it in raw images/avis until the end and then use x264 for the output the quality is marvelous. It does jam up your computer considerably though!