In short words:
JPG – Could be the finished “printed” photo, very similar to the prints you get in your hand from a developed roll of film. You can hardly do anything with them apart from view them.  These contain 8 bits per channel (RGB).

RAW – is the digital negative (one could claim the Adobe DNG format to be a better alternative). Here you have about the same possibilities as you would have taking your own roll of film into YOUR OWN darkroom, developing it on your own… including all the work and though required to get anywhere. These contain 12 or 14 bits per channel, in a RAW Bayer matrix.

Now note the difference. RAW images are NOT FINISHED as they come out of the camera – they give you the control, of HOW to post-process them, to a VERY much higher degree than what is possible using JPG files.

8 bits = 2^8 levels = 256 intensity levels. Example for each of Red, Green and Blue in JPG files.
12 bits = 2^12 = 4096 intensity levels and
14 bits = 2^14 = 16384 intensity levels – when used as color information.