Dots-per-inch (DPI) measures the grain in the image. For printed images you want to DPI of 200 (minimum) to 600 DPI. For displaying photos on the web, 72 DPI is the standard and matches the display capabilities of most monitors.
Number of pixels in the photo (some programs may allow you to specify in centimeters or inches). A good value for this is 800 to 1200 Pixels.
When you save a file in JPEG (JPG) format, you can apply a compression value to the file. The less compression the clearer the image will be but the larger the file. The more compression applied to the image you will see color variations and lines where the color changes.