The `amsthm` package provides an enhanced version of LaTeX's `\newtheorem` command for defining theorem-like environments. The enhanced `\newtheorem` recognizes a `\theoremstyle` specification (as in Mittelbach's `theorem` package) and has a `*` form for defining unnumbered environments. The `amsthm` package also defines a `proof` environment that automatically adds a QED symbol at the end. AMS document classes incorporate the `amsthm` package, so everything described here applies to them as well.
If the `amsthm` package is used with a non-AMS document class and with the `amsmath` package, `amsthm` must be loaded after `amsmath`.