In practice
DPI counts how many dots of ink or toner a printer or other output device places in one inch. It describes the machine, not the image file. An office laser printer might work at 600 dpi and the platesetter that makes printing plates at 2400 dpi or more; higher dpi gives finer edges on type and dots. When a print shop asks for 300 dpi images, they usually mean the image's pixel density, which is properly called PPI.
Often confused with PPI
DPI describes a printer's ink dots per inch; PPI describes how many of an image's pixels fall into each inch of its printed size.
Try this
Print one line of very small text at your printer's draft and best quality settings, then compare the letter edges with a magnifier.