well
first, you have to select the type of image format you want to save your animation on, in your case .avi, this is done on the render screen, on the "render output" secction.
Another problem that you might have is that you have checked the option of "single render" on the render screen-time output seccion( wich is the default value), change it to "active segment", and that will solve your problem.
I hope that helped you.