Most of what has been posted if completely correct. But I think, one really important difference is missing:
- JPG is 8 bit file format
- RAW is 12 bit file format.
That means, that RAWs store 16 times as much brightness and colour information than JPGs. And that is the reason, why you gain more latitude for correction and adjustements at the post-processing stage. I think, the "digital negative" expression reflects that pretty well, whereas the JPG reflects the final print (which also contains only a small part of all the image data, the negative records).
Ben