Type classes are a type system construct that supports ad-hoc polymorphism by adding constraints to type variables in parametrically polymorphic types. They allow defining behaviors for types through implementations of type class instances. Common examples of type classes are Eq for equality and Show for string representation.