This page explaines how to render a scene with alpha channel in image and animation. At first I explains for image and then for animation.
(1) Select "Scene" -> "Render buttons" in button window to show Format panel.
(2) Choose "PNG" format for output format and turn on "RGBA" button located on the bottom of the panel. (You can choose Targa format or Targa Raw format, of course.)
The "RGBA" button is to add alpha channel data to output data.
Next image is a result of above setting. You can see white edge around the object. If you use this in the white colored background or bright background, it might be OK. But if you use this in the dark background, the white edge would be emphasised. Next step shows how to remove this edge.
Turn on "Premul" button in the Render panel.
Once rendered it, the white edge is disappeared.
(1) You need to prepare an animation (See Animation tutorial to make an animation.)
(2) Choose "Quicktime" for output format in the "Format" panel. Then, next window will show up.
(3) Select "PNG" from a menu at the top of the window.(or select "TGA" or other format which can store alpha channel data.)
(4) Render the animation leaving other parameters as it is. Then, Blender renders animation with alpha channel.