Is every frame of a animation stored in RAM
No, they're not stored in RAM. For image sequence output, each frame rendered will be immediately written to the disk. Even video output using FFMPEG directly writes to the disk by chunks. 

I've tried rendering CG animation directly to video (not recommended) for hours, and there's no sign of increasing memory usage over time.