An algebraic data type is a type formed by combining other types in two basic ways. A product type bundles several values together, like a record with named fields or a tuple. A sum type offers a choice between several alternatives, each tagged by a constructor, like an enumeration whose cases can also carry data. The name “algebraic” comes from this combination of sums and products.
The Haskell 2010 Report defines these directly through the data declaration. As it states, “An algebraic datatype declaration has the form: data … T u1 … uk = K1 t11 … t1k1 | … | Kn tn1 … tnkn.” Each Ki is a data constructor; the bar separates the alternatives (the sum), and the types following a constructor are the fields it carries (the product). A worked example from the Report, data Set a = NilSet | ConsSet a (Set a), shows a recursive sum type with two variants.
Algebraic data types and pattern matching are partners. Because a sum type lists every constructor it can take, a pattern match over it can have one branch per variant, and the compiler can check that all variants are handled. The fields carried by a constructor are extracted by binding variables in the matching pattern.
The same construct exists across the ML family. The OCaml manual describes variant types, which name a set of constructors separated by bars, and record types, which group named fields. Together these give the language a precise vocabulary for modeling data whose values come in distinct, clearly enumerated shapes.