Comparative modeling predicts the 3D structure of a target protein sequence based on its alignment to template protein structures of known structure. It consists of four main steps: fold assignment, alignment of the target and template sequences, building a model based on the alignment, and predicting errors in the model. Comparative modeling is often used to facilitate functional characterization of a protein when its experimental structure is unknown, as it can provide a useful 3D structural model for proteins related to templates.