What is an ICC Colour Profile?

What's behind the Photoshop settings?

IT8.7 target for ICC profiling

An ICC profile helps you get the correct colour from a device, but it's a bit of a black box, data goes in and comes out without any hint of the process involved.
Consider how a profile is created.
You print out a colour swatch like this one, it's about 800 colour swatches with various CMYK formulae.
It is read by a spectrophotometer which records the actual colour that is on the paper. Now, we know the CMYK values for each swatch and we know the colour of that swatch.
So if we want to reproduce that colour, we have a CMYK formula, this is stored in a Look Up Table (LUT).
Simple really.

before and after prints showing improvement in colour.
Colour can be defined in several different systems, printers use CMYK, monitors RGB. These are device dependent colour spaces because they are specific to the system for which they were designed. Lab is a device independent colour space which was developed to act as a standard. An ICC profile is just a series of CMYK or RGB formulae linked to the colour that results in Lab. Now when an application 'sees' a colour in a picture it goes to it's ICC profile and converts it to Lab. From there it has a monitor profile so that it can render the correct colour on screen, it has a printer ICC profile so that it can convert to CMYK and maybe a separations profile so that it can achieve the correct colour on press. Once the Lab colour is known then it is simple to work back to the CMYK or RGB combination that gave that colour. Note that the first step is to convert to Lab, this is done via the working (or input) profile. This profile is as important as your output profiles and poor choice (by which we mean sRGB) can lead to poor colour. Try AdobeRGB1998 as a good input profile.