A data type in programming specifies the kind of data a variable can hold, such as numbers, text, or complex structures.