Use the dropper to select a colour from an image.

Left-clicking will set the foreground colour to the selected shaded, right-clicking will set the background.

If you are using the Brush or Fill tools, you can by-pass clicking on the Dropper icon by holding down the CTRL key on your keyboard.
The Dropper tool will be temporarily selected.