An apex class is a template from which Apex objects can be created. These classes consist of other classes, variables, user-defined methods, exception types, and the static initialization code.