Most nonpermanent markers use inks that are made of colored pigments and water. When you use one to write on a dry coffee filter, the water in the ink transfers the pigment onto the paper. When the ink dries, the pigment remains on the paper.
Here, when you dip a marked-up paper strip in water, the water travels up the paper due to a phenomenon called capillary action. When the water comes in contact with the dried ink pigments, they dissolve and get carried along with the water. Different-colored pigments are carried along at different rates: some travel farther and faster than others. The rate each pigment travels depends on the size of the molecule and how strongly it’s attracted to the paper. Since the water carries different pigments at different rates, the black ink separates to reveal the colors that were mixed to make it. This technique is called chromatography. The name comes from the Greek words chroma and graph for “color writing.” The technique was developed in 1901 by Russian botanist Mikhail Tsvet, who used it for separating the pigments that made up plant dyes.
There are many different types of chromatography. In all of them, a gas or liquid (like the water in your experiment) flows through a stationary substance (like your coffee filter). Since different ingredients in a mixture are carried along at different rates, they end up in different places. By examining where all the ingredients end up, scientists can figure out what was combined to make the mixture.
Why does mixing many colors of ink make black? Ink and paint absorb some of the colors in white light and reflect others. The reflected color is what you see. For example, green ink looks green because it reflects the green part of white light and absorbs all the other colors. Red ink looks red because it reflects red light and absorbs all the other colors. When you mix green, red, blue, and yellow ink, each ink that you add absorbs more light. That leaves less light to reflect to your eye. Since the mixture absorbs many colors of light and reflects very little, you end up with black.