An ICC profile (ie file with .icc or .icm extension) can be considered as the 'colorimetric identity card' of a peripheral and will adjust the unique way a paper should be printed on a specific printer. The more devices you integrate in the whole printing chain (ie DPA, scanner, screen, printer / paper) via color management system, the better the printing results.
How is an ICC profile determined ? Each profile each measured directlty from a peripherical device. Standard printed areas having up to few thousand of colors patches, are measured with the help of a colorimeter or spectrocolorimeter, and the outcoming datas will be computered to determine the profiles.
How does this work ? The ICC profiles are based on L, a, b color mode, which is the common 'language' imposed by the color management system, and the closer to the human vision. For instance, a screen using the additive RGB synthesis and the subtractive CMYK printing of a paper, can only be adjusted by the mean of the common LAB language or values, which will be converted at every step of the printing chain, by the color management system. The L, a, b mode is the main computing asset of the ICC (International Color Consortium) architecture.
Caution: an ICC profile is NOT a photo editing software ! It solely reflects the colorimetric capability of a peripheral for given conditions of use.