Cognitive complexity measures how hard code is to understand by humans, not machines. Unlike traditional metrics, cognitive complexity considers the mental effort required to read and comprehend code.