How I can have an object in the foreground with a transparent background? I do not want to have a background that is just keyed out because that always leaves halos even when I do the correct lighting. So how would I go about having a background that is transparent alpha channel and all? Also what video file do I have to use to preserve the alpha channel?
You need to go to the "Properties" panel, "Render" tab, subsection "Film" and check "Transparent".
Also, keep in mind that animations should first be rendered to individual images, to avoid file corruption, and joined using something like Blender's Video Sequence Editor. This is demonstrated in this video.