What are the x, y, and z in the /testforblocks command?

The first set of coordinates (x1/y1/z1 to x2/y2/z2) are the bounding box of the initial structure, while the supplementary x/y/z coordinates are the lower north-west corner of the location you want to compare to.

In the following image, the yellow glass represents x1/y1/z1, the blue glass represents x2/y2/z2, and the white glass represents x/y/z (assuming the player is facing north):

Left: initial, right: target

The command specifically compares two structures rather than searching for a block anywhere in the area. In the image (if replacing the glass with redstone blocks), the two structures do not match because the target structure is missing a block in the middle (which must be a redstone block instead), so the command fails.