Compression
Compression reduces your photo's file size, with or without quality loss. JPEG uses lossy compression, which throws away data for a smaller file; TIFF and PNG offer lossless compression, which keeps everything. When exporting, you choose how much compression you accept.
When exporting a JPEG you set the quality (often 0 to 100): around 80 is usually a nice balance for web between sharpness and file size. Too much compression gives visible blocks and artifacts, especially in smooth skies and at sharp edges. Never resave the same JPEG over and over, because each time it compresses further and the loss stacks up. For archive or print, keep a lossless TIFF or your RAW.
Prefer a look in one click?
The presets on this site set these adjustments up for you as a starting point, which you then fine-tune to taste.