To calibrate an image we have to take dark and flat frames. Dark frames are frames taken with the scope covered so that only contain information noise. As the noise is random it is necessary to take many dark frames and average them to obtain a master dark frame. Dark frame calibration process subtracts from each pixel of the image the value of the same pixel in the master dark master to get only the signal for that pixel. This eliminates from the image (in fact greatly reduces) noise, background brightness and hot pixels.
Flat frames are frames obtained by taking a uniformly illuminated field with the same optics used to obtain the image to be calibrated so that, once dark frame calibrated indicate how each pixel of the sensor reacts to the same signal because the light does not reach evenly to each sensor pixel or because each sensor pixel responds differently to the light. As the flat frames also contain noise it is also necessary to take many flat frames and average them to obtain a master flat frame. The calibration process involves dividing each pixel of the image by the value of the pixel in the normalized master flat frame to get only the corrected signal for that pixel. This eliminates (in fact greatly diminishes) the effect of dust on the sensor, light reflections and gradients.