A type system is a set of rules that govern the assignment and manipulation of data types in a programming language.