CSS specificity is a concept that determines which styles are applied to an HTML element when conflicting styles exist. It is based on a set of rules that assign a value to each selector based on its specificity, allowing the browser to determine the most specific style to apply.