RAW files are often referred to as "digital negatives", so I can understand where your confusion came from. When shooting you are capturing all of the information in the scene.
If you set your camera to shoot in raw, all of the information, with nothing "altered" will be transferred to your computer. This image file can then be worked on, or "processed" in photoshop, or Lightroom, or whatever programme is used.
Because the camera transfers all of the captured info to the PC, it is possible to do more with a raw file, for example, you can pull more info from an underexposed image in raw, so you can recover shadow detail, which would be lost in jpeg.
If shooting jpeg, the camera processes the image for you, and applies any settings you have set on your camera, vivid colour, size etc, and discards any extra information. It then compresses the image, which is why jpeg files are much smaller than a raw file.
This is a very basic description, and it is a bit more invilved than that, but it gives you an idea.
If you do a search, there are plenty of threads about shooting raw vs jpeg.
Hope this helps.