Two epimers are diastereomers with opposite configurations at exactly one of the two or more tetrahedral stereocenters in their molecules. Their connectivity is the same, and configurations at the other centers agree. The definition is more specific than simply calling two compounds stereoisomers.[ref]
D-glucose and D-mannose illustrate the relationship: their configurations differ at carbon 2 while the other corresponding stereocenters agree. This local change can alter recognition by enzymes without changing the elemental composition or the carbon-chain connectivity.
For a hypothetical molecule with corresponding stereocenters 2 and 3, the configurations and differ at one center and can form an epimeric pair. Changing both to is a different comparison: it does not satisfy the one-center condition. These labels assume the same molecular connectivity and consistently assigned centers.
A molecule with only one stereocenter does not produce an epimer pair merely by reversing that center: its two configurations are enantiomers, whereas the epimer definition requires a diastereomeric relationship. Epimerization names a process that interconverts an epimeric pair; it does not by itself specify the reaction mechanism, rate or equilibrium ratio.

Articles by others on the same topic (1)

An epimer is a type of stereoisomer that differs from another compound in the configuration around just one specific stereogenic center (chiral center). This means that while the two compounds have the same molecular formula and may be very similar overall, they have different spatial arrangements of atoms at only one of their chiral centers. Epimers are particularly common in carbohydrate chemistry. For example, glucose and galactose are epimers because they differ at only one carbon atom (C4).