After effects rendering
As @Oliver-G said above, your final use of the footage will dictate your render settings. But I'm going to explain HOW rendering works, because it's essential knowledge.

Rendering is the process of taking your After Effects comp - a series of instructions of how to process files - and writing every pixel's value to a file (See footnote 1).

The way AE does this is to work from each layer from the bottom-most upwards, calculating expressions, effects on each later, motion etc. Then it computes the next bottom-most layer, laying it over the previously computer layer(s). The final size is not dependant on the complexity of the comp, so a still image will be the same file size (footnote 2) as a full composite with particles, effects, 3D elements etc.

Once this is done, AE then runs the resultant file through a compressor, which is where you choose your codec(s) and compression.

Codec: Every file has three (footnote 3), one for Audio, Video and Container. Think of a codec like the format for that stream in the file - so you can mix and match codecs. This is why .mov files can be unplayable on some systems: Quicktime is a Container format, and can have any of a huge number of video codecs in it.

Compression: Set how much data is "thrown away" to achieve a smaller file size. Similarly (footnote 4) to how a .zip file has a smaller size than the files it contains - fewer bits to be stored - compression can reduce the file size of a video, at the expense of quality. This is why web video - YouTube especially - looks atrocious, because it is reduced to such a small file size.

These settings are accessed through the Output Module button under each file in the Render Queue.

What you did when exporting is leave everything Uncompressed, so you had a huge file size.



Footnotes


For those with a deeper understanding of encoding, yes, I realise that keyframes, I/B frames make this statement untrue. But it's simplified for this explanation.
Not true, depending on how the codec's compression chooses to handle movement - a still image will be smaller because the codec doesn't have to record every frame of new data.
At least three, for a normal Audio+Video+Container. Multiple audio/video tracks, 3D etc. all add more codecs to the one file.
Not at all, but hey, cut me some slack :)