The actual value that must be achieved is the "target" as represented in the "compact" form. When the next target value is computed, the result of the computation is converted to the compact form to get the actual value that is used. The difficulty is derived from the target.
I don't know why the target is stored in the block header, since it must be computed for validation anyway and it doesn't vary.