DPI means dots per inch. It is a number stored in the image file that tells printers how large to print it. It does not change how many pixels the picture has.
DPI versus pixels
A picture that is 600 × 600 pixels stays 600 × 600 pixels whether its DPI is 72 or 300. Only the printed size changes: at 300 DPI it prints about 2 inches wide, at 72 DPI about 8.3 inches.
When forms ask for DPI
Some forms ask for a photo or scan at 200 or 300 DPI. In most cases they check the DPI value in the file or the pixel size you would get at that DPI. Because the check is usually about the stored value, setting the DPI tag correctly is enough when pixel size is already right.
How to change it
Use a DPI tool that writes the value into the JPG or PNG without resampling the picture. Check the result in your file properties.
Scanning
For scanned documents, 200 to 300 DPI is a good balance between readability and size. Higher DPI makes files much bigger.