Well, it's the monitor that is being calibrated - but I guess you mean where is the correction carried out?
Calibration normally creates correction information in the form of a look-up table (LUT). The LUT is used to adjust RGB values sent from the program before they are applied to the screen. As I understand it, the LUT adjustment is usually done in the graphics card, or it's done in some higher-end monitors (i.e. by the monitor hardware), or it could even be done in the driver software.