It is widely established that chronic pain has a negative effect on neurocognitive functioning, in both adult and pediatric populations. These impairments are specifically strong in the areas of memory, processing speed, attention, and executive functions, and particularly among older patients and those with fibromyalgia. However, the exact mechanism explaining the relationship between cognition and pain has yet to be determined. Two main hypotheses are posited: 1) pain is distracting and removes focus from the task at hand, resulting in decreased cognitive performance, and 2) the neural systems involved in both pain and cognition are closely linked and may even modulate one another reciprocally.The relationship is complex in nature and it is important to consider factors that could be potential mediators or moderators of the relationship, such as age, sex, cognitive load, fatigue, opioid use, pain intensity, pain location, sleep disturbance, fatigue, tendencies toward somatization and/or somatic vigilance, and emotional state. These factors have all been shown to interact with cognition on some level, whether they are independently associated with cognitive dysfunction or, in tandem with pain, disrupt cognitive processes.