First of all, it's not a stupid question at all! You sound willing to learn, and asking questions is always one of the best ways to do that.
So I'm getting the hang of my new DSLR and I'm shooting almost all the time in manual, although I'm trying to get the hang of night time shots.
Small piece of advice - shooting in manual is admirable if you're taking the time to learn what aperture/shutter relationships mean, and what settings are appropriate for a given lighting situation. But learning about cameras also involves learning how to control them and get the most out of them in every mode...and knowing when to use a given mode. Shooting in manual 100% of the time won't necessarily get you better results or make you a better photographer - but it can be a great learning tool if you learn from the trial and error. But knowing when to take advantage of the camera's abilities, exposure and drive systems, and focus systems, and when not to, will define your excellence in photography.
Anyhoo, I keep reading about shooting in RAW as opposed to JPEG. All I really know is that jpeg is the file extension when you want to post pictures.
There are hundreds of image file formats out there in the world - don't go looking too hard or you'll make your head spin with options! However, it is generally accepted that JPG is the most common and most used of compressed image formats for displaying and sharing photos.
Sorry if this is an extremely stupid question but what exactly does RAW do and why is it better to shoot in RAW?
A suggestion here, that I hope you will be able to keep coming back to for assurance and clarity: You will see a great many suggestions from other photographers about the superiority of RAW, some will be reasonable and technical and tell you all the reasons it is better, and some can get a little insulting and unreasonable and state that anyone not shooting RAW is somehow inferior, more ignorant, incapable, or simply not a good photographer. And surely some JPG shooters may snap back and occasionally try to tell you RAW isn't really any better than JPG. Try to filter through all of that - and remember one important thing: BOTH ARE FINE AND VIABLE FORMATS, THAT REMAIN A CHOICE FOR EVERY PHOTOGRAPHER TO USE - NEITHER MAKE YOU A BETTER PHOTOGRAPHER OR A SUPERIOR PERSON. Through whatever follows, remember this.
RAW is (mostly and usually) an uncompressed image format. When you shoot a JPG with your camera, you snap the shutter, and the camera starts going to work applying 'processing' to the photo: how much contrast to apply, what tone curve to use, what white balance to choose, how much sharpening to apply, etc so that the end result is a finished, presented photograph, ready to share with the world. When the camera makes the choices, it tosses out the unused choices...once a tone curve is applied, it can't be changed to a different tone curve, once white balance has been chosen at tungsten, it can't be changed to 'daylight', and so on. RAW keeps all that information, giving you an essentially unprocessed photo (you may see a processed result on your camera screen, but that's a presentation jpg using the camera settings to show you something on screen). It's up to you and your RAW conversion software to then to process the photo on your computer. You take all that information, and decide what tone curve, color, saturation, contrast, sharpness, white balance, etc to apply to the photo. The 'default' settings you had in the camera may present themselves in your RAW processor initially, and it is possible to simply process the RAW photo at the default settings, but if you want to make changes to those settings, you can. All of the processing is done by you, at the computer, rather than in the camera by the camera.
Now note two things: Some folks will mention that you can process a JPG too - and indeed you can. The difference is, you are starting with the final output that came out of the camera with all of the camera's processing settings already applied - you can't UNDO settings and redo them differently, you can only process from that result forward - altering it from where it is. There's decent heaadroom to make changes to a JPG and improve them, but a RAW will always have significantly more headroom since you can unapply any camera processing and start from scratch.
Some folks will mention that the JPG is like a microwave dinner, or pre-prepared meal and you have no input or ability to decide what your photo looks like - that superior photographers want to control the output of the photo and JPG is for ignorant button pushers with no understanding of photography. However, even using in-camera processing, you have significant control over how that JPG comes out of the camera to begin with...making the right settings in the camera, and choosing the right white balance and exposure while shooting, can give you results out of the camera that are precisely what you wanted and save having to do any (or as much) processing afterwards. You can choose your camera's JPG tone curve, the level of contrast, the level of sharpness, the color profile, the saturation that it will apply. You can set the white balance to presets or manually before you shoot. You control the exposure, and whether to under- or overexpose as you see fit. You can apply dynamic range optimization in camera, or use advanced features like in-camera stacking or HDR merging. Shooting in JPG doesn't have to involve being a snapshooter and having no input over your image.
RAW is unquestionably a better format for post-processing, since it is an uncompressed format that contains all of the photographic information with nothing thrown out and no camera settings applied - all the options within the camera are instead up to you to apply in the computer. JPG is an option for those who would prefer to either let the camera make some processing decisions to reduce the amount of time they spend doing it themselves, or would like to set up their camera exactly the way they like it to get excellent JPGs out of the camera that they can enjoy without requiring extensive post processing to fix or correct. Both are fine options, both are used by excellent and professional photographers alike, and both should remain a viable choice for you to decide which is more to your personal preferences.