Your eyes don't really have red, green, and blue cones. They have cones with peak absorbency close to red, green, and blue, but these cones also respond to other wavelengths. Our ability to see color comes from these three cones responding differently from the other. For some people, their red and green cones significantly overlap which means that they can't really distinguish red from green.
These glasses, only work for some types of color blindness (red-green).Red/green colorblind people still see red and green, but the problem is that most light that is red or green activates the cones for red and green. These glasses filter out the wavelengths that activate both cones simultaneously, so the person is able to see each one distinctly.