RAM is Random Access Memory. The iPhone, iPhone 3G, iPod Touch, iPod Touch second generation all have 128mb of RAM. The operating system and applications are loaded into the RAM when launched for quick access as the hard drive or SSD drive is not nearly as fast. When you shut down your phone or computer, your RAM is wiped. If your computer is running slow, the best thing in nearly all cases you can do is upgrade your RAM (after running the usual tune ups of course).
Then you have the SSD drive, which is similar in operation (but not build) to a hard drive. It permanently stores files like your music and movies and applications.