A type system is a set of rules that assigns a property called 'type' to various constructs in computer programs, such as variables, expressions, functions, or modules. It helps in classifying the data that can be processed and manipulated within a programming language, ensuring that operations on data are conducted correctly. In higher-order logic, type systems help to avoid inconsistencies and errors by enforcing constraints on how terms can be used.