Originally posted by: PrincessGuard
I assume you mean non-volatile memory since all RAM is solid-state
There are many ways to do this. For example, NVRAM can be made of an array of floating-gate transistors. They are like normal MOSFETs but have an additional insulated "gate" between the channel and the connected gate. The purpose of the floating gate is to change the threshold voltage of the transistor. Putting a negative charge on the floating gate will increase the threshold voltage of an n-channel FET; removing charge will decrease the threshold voltage.
So, if you put a large enough charge on the floating gate, you can make it so that the FET will not conduct under normal operating voltages. This gives you a logical 0 (or 1, I don't know what's actually used). A FET that has an uncharged floating gate will conduct, giving the opposite logic.
The trick is that the floating gate is insulated all around, so there is nowhere for the charge to go even when there is no power (well, the charge will eventually drain away due to oxide breakdown and whatnot). That's how you store data.
The actual charging and discharging (writing and erasing) is done through quantum tunneling, i.e. apply a large enough electric field and electrons will jump through the oxide into/out of the floating gate.