You need to open two images: the one you want to adjust and the image you want to make a selection from to 'borrow' its colours. We are using a sunset shot as we want to warm our coastal shot up with its shades.
In the image you want to 'borrow' the colours from, make a selection around the part of the image that has the colours you want to use. Most of the time it will be the sky (as it is in our shot). We used the Quick Selection tool to make our selection.
With the selection made, click on the image you want to adjust and duplicate the layer then if you want to apply the colour changes to just one part of the image, use a selection tool to select the specific part of the shot.
Next, go to Image>Adjustment>Match Colour. A new window will open and you need to move your eyes towards the bottom of it to where it says Image Statistics.
You need to select the name of the file you made your selection from in the source and in layer, make sure the top layer is selected. If you're sourcing your colours from a selection make sure: 'Use Selection in Source Calculate Colours' is selected and if you've made a selection on your target image, make sure 'Use Selection in Target to Calculate Adjustment' is ticked. You can also adjust the various sliders available to tweak the shot if you so wish then hit OK once you're happy. If you're happy with the way the image looks then feel free to save it now but in ours, there are a few tweaks we want to make. By duplicating the layer before making any changes we are able to pull some of the details from the original shot into the top layer.
To do this, click on the layer mask icon in the layers palette (circle sat in a rectangle). Select the Paintbrush tool, making sure the foreground colour is set to black, reduce the opacity of it to around 25% and paint over the parts of the image you want to bring some of the original detail back into. In our image we painted back over the cliffs and some of the foreground as the new colours just look a little too strong.
Match Colour has many other uses too including changing the colour of a car or someone's top, for example.