Simply put, the tool will replace the original color with a color you choose. It samples the pixels of the color immediately under your cursor and applies changes that are similar to that color within the radius of your brushstroke.