What is RAM?

I know it is random access memory, but what is it exactly and why does it exist in the first place?

I thought it was basically a bunch of small boxes or lights that represent 2 values (on and off/1 or 0) but I don't know why is it there exactly.