how do people recover data from ram?

Solution 1:

Freeze the chip, pop it into another computer, and run the linux command dd to copy the raw data to disk.

After you have the raw data, copy it to a new partition using dd again and run an undelete program on the partition. Undelete should pull out any files that fall under a recognizable format (ex pictures, etc...). The rest could be further processed but not easily unless you know what you're looking for.

I can't say that I've done this myself but it's not hard to imagine how it's done.

Check out this video that Daniel Beck posted in the comments to see a demonstration of how to crack hard drive encryptions using this method.

Solution 2:

You can't (in practice). RAM needs to be constantly refreshed to keep "remembering", when the computer is turned off the charge leaks out after a minute or so.

Form wikipedia

Dynamic random access memory (DRAM) is a type of random access memory that stores each bit of data in a separate capacitor within an integrated circuit. Since real capacitors leak charge, the information eventually fades unless the capacitor charge is refreshed periodically. Because of this refresh requirement, it is a dynamic memory as opposed to SRAM and other static memory.

The main memory (the "RAM") in personal computers is Dynamic RAM (DRAM), as is the "RAM" of home game consoles (PlayStation, Xbox 360 and Wii), laptop, notebook and workstation computers.

The advantage of DRAM is its structural simplicity: only one transistor and a capacitor are required per bit, compared to six transistors in SRAM. This allows DRAM to reach very high densities. Unlike flash memory, it is volatile memory (cf. non-volatile memory), since it loses its data when power is removed. The transistors and capacitors used are extremely small—millions can fit on a single memory chip.