When Blender says out of memory error what exactly do I need to free up or replace? I am trying to render this complex scene I am using an hdr and a couple of hair particle systems and when I tried to render the animation it said out of memory so what do I need to do ? Do I get a new bigger ram or a new graphics card . I’ve been using blender for about a year and it was rendering fine but now I am trying both cpu and gpu renders and it won’t work .
Are you rendering it on GPU or CPU?
If it's GPU then you 

(a) try splitting up and rendering the scene over different render layers

-OR-

(b) try rendering it on CPU instead. I had to render a complex scene too earlier this month, it kept crashing every time I tried to rendering it on GPU; worked just fine on CPU however it took longer (obviously). If the problem still persists on CPU rendering then you could consider upgrading your RAM; I, myself, have 16GB and that just barely enough for complex renders.