Perhaps "compressing" is a bit misleading in this context - unless you specifically ask your program to reduce the image size or compress at a higher level, the file probably won't get any smaller and in fact may well even get bigger. That doesn't mean that lossy compression isn't being used though (if that makes sense).
To go along with CaptainCrash. I was wondering about the whole "compress" "decompress" that keeps being mentioned in this thread. If a JPG truly used that process, then the image would be exactly the same as the original every time it was opened. No, that's not how it works.
To explain in simple terms: With a BMP image, the information for each individual pixel is saved, well, individually. This can result in very large files and the file size can be calculated mathematically. For example, a 640x480 pixel image using 16-bit color (65000 colors) should be 614.4K (a little more or less depending on tagging the application might put in it). It doesn't matter what content is in that file -- it could be all white or be an extremely complex image, but it will still be the same size.
With a JPG, however, the software takes a look at a pixel, and all the pixels around it, and determines how close they are together. If 10 pixels are next to eachother and have the exact same attributes, the software says take this information, and repeat it 10 times. If 10 pixels have nearly the same info, it will average out the difference and repeat that (this is what causes the "block" affect you see in images). This information is written to disk and cannot be "decompressed". The image quality can never be recovered.
If we take that same 640x480 all-white image and save it as a JPG, it simply reads the information from one pixel and says repeat it 307,200 times. This can result in extremely small file sizes. Obviously this is just a quick summary of the algorithm. There is a lot more to be considered, but hopefully it works as an example.
You can compress and decompress a BMP image quite effectively, using your normal ZIP operation. This way you get a smaller file size for sharing through email and such, but will not lose any quality.
PNGs, TIFs, GIFs, etc are totally different though. But you can read more about those on the wiki if interested.