XOR operates on two sets of polygons. A set may consist of a single polygon in some applications. First, the Union function is run on each set. Then the two sets are XOR'd. The polygons that result can be though of as the union of the two sets minus the intersection of the two sets.
The truth table for XOR is shown below:
Layer 1 is red. Layer 2 is blue. Polygons previous to XOR Operation.
Output of the XOR operation is a single layer.