RAW is a format which is lossless... you can keep editing it and the original is not affected. Also it is the format which the data is stored when the picture is taken, you choose how you want to convert it in post-processing stage.
Jpeg is limited by the camera's conversion method and it is a lossy format. Lots of details are lost and will be continuously lost as you keep editing it and saving over it.
This is the to-the-point answer to your question of the difference between RAW and JPEG.