Chronic pain is considered a public health priority by the World Health Organization and European health institutions. It has reached alarming proportions in terms of disability, consumption of health and social resources, and impact on primary and specialist care services. Primary care physicians are often called on to manage this condition. Chronic pain management can be challenging due to its complexity. It has traditionally been considered to include nociceptive pain that that persists longer than the normal healing time, neuropathic pain lasting more than 3 months, or a combination of these. More recently, a third descriptor, nociplastic (primary) pain, was added to classify patients with chronic pain conditions such as fibromyalgia, nonspecific back pain, or mixed pain that persists or other conditions in which altered central pain modulation results in central sensitization and chronic pain in the absence of actual or threatened damage to tissues, including in the somatosensory nervous system. This document provides an overview of pain types and their underlying mechanisms. Successful pain management is facilitated by identification of the pain type. A set of diagnostic tools and a pain algorithm are presented to guide the clinician toward the correct diagnosis. The algorithm identifies cases that may require referral to a pain specialist. Once the site of origin of the pain (the "pain generator") is identified, or a primary pain syndrome is suspected, the accompanying article provides information and rationale to support treatment decisions based on patient characteristics.