DPI is Dots Per Inch. Thus, it is a relationship between the ACTUAL print size and the number of pixels (dots) in your image.
Thus, you can have two images, both 600x400 pixels (dots). If you print that photo 1 inch WIDE, the final PRINT has a resolution of 600 dots per inch. Print it 2 inches...