The Subtract texture subtracts the value of one texture from another similar to the Subtract layer mode in Photoshop. In figure 1, texture 1 is subtracted from texture 2 according to the color values. The colors are generated from the Gradient nodes. Any image or procedural texture can be use.

Figure 1: Using the Subtract node to mix two texture maps together.