RAM is the "main memory", and is used like a computer's "working space". Disk-based systems typically need more RAM than cart-based systems, because they load slower, and can't just "grab what they need" from the storage device at a whim. They need everything they think they might need, all laid out beforehand.
The PlayStation and Saturn each had 2 megabytes of RAM.
The N64 had 4 megabytes of RAM, and if you got the Expansion Pak (for games like Majora's Mask or Perfect Dark), it added another 4 megabytes of RAM (making it 8MB).
The DS supposedly has 4MB of RAM, but Nintendo could always potentially increase that for later DS games, with an expansion pak you could plug into the GBA's cart slot (like Sega did with the Genesis's cart slot when they came out with the Sega CD). Of course, "add-ons" are never as popularly supported as the main unit (it's just not possible).
For a bit more reference (even though they're not really comparable systems, but whatever), the PlayStation Portable initially was announced to have 8MB of RAM, which Sony specifically claimed was a "massive" amount of RAM, but the third parties said it was horribly inadequate for what Sony wants the PSP to do (considering that Sony says it's more powerful than the PS2, and the PS2 has 32MB of RAM), so Sony said "okay, we'll make the PSP have 32MB too".