Lets start by setting our foreground and background colors to default by pressing "D" from your keyboard. It will ser foreground and background colors to default Black and white respectively.
Select eye dropper tool and choose a color of your choice. We'll add this color to swatches palette. We've selected a brown shade from this picture of bird.
As soon as you click on this color our foreground color set to brown.
From windows menu select swatches if swatches window is not open already. Click on empty space in swatches window.
Define a name for the swatch. We call our new brown swatch "bird".
Now you can see a new swatch at the end with name "bird".
To set foreground color to any color from swatch palette just click that swatch and foreground color will be set to that particular color.
To set background color to any color from swatch palette Press Ctrl from keyboard and click that swatch and foreground color will be set to that particular color.