An error amplifier is essentially what its name says, that is, it amplifies an error signal. This error is based on the difference between a reference signal and the input signal. It can also be treated as the difference between the two inputs. These are usually used in unison with feedback loops, owing to their self-correcting mechanism. They have an inverting and a non-inverting input pin set, which is what is responsible for the output to be the difference of the inputs.
