Most high end compact cameras and all DSLRs give you the option to select image quality.
Now, there's generally three levels of jpeg image quality. Something along the lines of fine, normal, and basic. Fine being the best and basic being the lowest. Which are different compression levels of how big that file will physically be. All DSLRs offer the ability to shoot in raw, which is a huge file type. It saves a lot of data that's really beneficial and advantageous if you're looking to do any editing after the fact.
Some cameras will also offer you the option to shoot in a tiff file, although we usually don't do that in camera. It's much better to edit a tiff file and save your post edited raw file as a tiff on your computer and not shoot tiff in camera.
Depending on what you're shooting for, you can decide what size your file type should be. If you're shooting jpeg, chances are shooting at the highest compression is going to be fine. Because these days memory cards are so gigantic, it's not normally a problem having larger files. However, if you are crunched for space, dialing down your file size is a really good way to save memory.
So if you're shooting something like a sporting event, say a football game, it would be better at that particular moment to switch into jpeg mode, especially if you're shooting on a burst mode, you're going to be taking in potentially thousands and thousands of photographs. It'll just make your life a little bit easier.
However, if you're shooting something, let's say, like a portrait, shooting a raw file will just give you more data to spend on that individual file. Again, it kind of depends on what you want to do with the file after the fact. Whereas you're not going to spend a long time editing a sports image, you're going to spend a really long time with a portrait. So having the larger file on the portrait makes a lot more sense. Whereas having the mass quantity of frames on the sports side makes a lot more sense.
Another tip I give to a lot of people is to always switch into raw mode when shooting at night. Shooting at night can often fool your camera's auto exposure, so shooting in raw basically just gives you more of an ability to correct after the fact. It's a great way to save photos that may not have been shot perfectly the first time around.