Using Photoshops Image Size dialog
Open any image in Photoshop then go to Image > Image Size... to open the Image Size dialog. Now what you set in this dialog depends on what you want to do with your image. Basically there are two situations: you want to display the image on a computer screen or you want to print the image.
Preparing for screen display
If you need the image for display in a web browser a width of 2268 pixels (see screenshot above) is way too wide. You have to bring the dimensions down to a more approbriate size. Check the Resample Image and Constrain Proportions box, then enter the desired width (in this case 640 pixels) in the Width entry field. Since you checked Constrain Proportions the proper image height is calculated automatically by Photoshop. One additional thing you should set before clicking OK is the algorithm used by Photoshop to calculate the smaller image. Choose "Bicubic Sharper (best for reduction)". Older versions of Photoshop don't have this option.
That's all you need to do when you resize an image for the web. All settings under Document Size are meaningless because you can't use Photoshop to control the width, height and resolution of an image on a computer screen. The image is displayed pixel by pixel and its size is only determined by the physical height and width of the display and its vertical and horizontal resolution.
Preparing for print output
Continuous tone images
If you want to print the image the pixel dimensions become meaningless. What counts is the desired width, height and resolution of the image . Check Constrain Proportions and set the desired width in inches or mm. For printing continuous tone images on any type of printer a resolution of 240 to 300 pixels per inch is the best choice regardless of the resolution of the printer. Note that Photoshop automatically calculates the required width and height in pixels. In the example below the image needs to be 1800 pixels wide in order to print 6 inches wide at 300 pixels/inch (1800 / 300 = 6).
If you prepare line art (images without gray tones consisting of just black and white pixels) set the image resolution equal to that of your printer. Do this before you convert a continuous tone image to line art because you may not resize line art. I.e. use 600 pixels/inch for a 600 dpi printer and 1200 for a 1200 dpi printer. In the example below the image is sized for printing on a 600 dpi printer before converting it to line art. The original image is too small to be 6 inches wide at 600 pixels/inch so Photoshop has to add pixels. As you can see 3600 pixels are needed (3600 / 600 = 6). If available use Bicubic Smoother for any enlargement.