What it actually is
DPI stands for dots per inch. In a picture file it is just a note saying how many pixels should be printed per inch of paper. The picture itself is a fixed grid of pixels. The note decides how large that grid appears on paper.
The sum
Print size in inches is the pixel count divided by the DPI. A picture 3000 pixels wide prints 10 inches wide at 300 DPI, and 20 inches wide at 150 DPI. The pixels are the same, only the spacing differs, so the 150 DPI print is coarser.
Why 300
At about 300 dots per inch, printed pixels are too small for the eye to pick out at reading distance. That is why 300 DPI is the usual request for print. Posters viewed from far away can use much less.
Does DPI matter on a screen?
No. Screens show a picture at its pixel size. A 1000 pixel picture looks identical whether its tag says 72 or 600. Changing the number does not add detail or change the file size.
When you do need it
Some forms ask for a picture 'at 300 DPI', and a few printing services do too. If you only need to change the tag, the DPI changer edits it without touching the pixels. If you need an actual printed size such as 10 by 15 cm, the centimetre resizer works out the pixels and sets the DPI together.
DPI and PPI
Strictly, PPI means pixels per inch on a screen and DPI means printed dots per inch. In everyday use, and in image files, people use the two interchangeably.