A question about mesh adaptation

Hi, can someone explain to me exactly what the parameter err does in the function adaptmesh? I know that it is a measure of error and that it controls the accuracy of the interpolated function, but I’d like a little more insight. Many thanks!