Color filters absorb certain wavelengths of color and transmit the other wavelengths allowing them to be seen.
We know that light is the source of color. For example, a blue flower absorbs all other colour wavelengths of light except blue, which it reflects making us see blue. Color filters work the same way, absorbing certain wavelengths and transmitting the other wavelengths. As a result of this, when placing a color filter on your lens, certain colors of the image will be enhanced, and contrast between them may be increased or reduced.