A pixel is the smallest element of a digital image. A pixel is one dot out of the multitude of dots that comprise a digital image. The clarity, or resolution, of a digital images is described as "pixels per inch" or PPI. PPI is the number of pixels in one inch of digital image displayed on a computer screen. The number of pixels per inch determines maximum size the image can be printed without compromising clarity.
The DPI ("dots per inch") refers to the printer. DPI is the number of dots that a printer can produce in one inch. Most printers use three or four colors of ink blended to produce the multitude of hues in a color photograph. Often the computer needs multiple dots to print a single pixel that may contain several different colors. Printers with a high DPI produce more dots per inch and get higher quality prints.
You can re-size a digital image to increase or decrease the size of the printed image. When you increase by re-sampling the PPI in a photograph editing program, the computer adds pixels to the digital file. The added pixels increase the overall file size but degrade the quality of the image. Resizing but not re-sampling the PPI will change print size. Decrease the PPI to increase the print size. Increase the PPI to decrease the print size.
Digital cameras capture light with a sensor measured in megapixels. A "megapixel" is one million pixels. The megapixels of a digital camera sensor determine the maximum print size of a digital image. For example, a two-megapixel camera can produce print slightly smaller than four inches by six inches from a picture that is 300 PPI. A four-megapixel camera produces a print slightly larger than eight inches by five inches at 300 PPI.