What are the two main file formats for saving digital pictures in a digital camera?

JPG and a native (proprietary) RAW format. TIF used to be common, but no more. JPG is a "lossy" compressed format, limited to 8 bits of information per RGB chanel, per pixel. The term "lossy" means that the data isn't completely (1-for-1) restored when it's saved. RAW formats vary, and are highly dependent on the sensor in the camera. Instead of using the firmware in the camera to render the image, you use software in your computer to render the image. The file typically caries 10 bits of information per RGB channel per pixel, or more. This can give you more options for dynamic range (ratio of lightest part of the photo to the darkest), and finer graduation between the colors.