A compressor suitable to be installed at an apparatus including a refrigeration cycle, the compressor comprising: a piston which reciprocates in a cylinder; a linear motor configured to provide a driving force to move the piston; a sensor configured to sense a motor current of the linear motor; and a compressor controller configured to detect information related to a load of the apparatus, in a separated manner from a controller which controls a body of the apparatus, wherein the compressor controller is configured to: calculate a phase difference between a stroke of the piston and the sensed motor current; compare the calculated phase difference with a reference phase difference, and control a driving of the linear motor in correspondence to the detected load, according to a result of the comparison; drive the linear motor such that a cooling capacity of the compressor is changed according to the result of the comparison such that: the cooling capacity of the compressor is increased when the calculated phase difference is larger than the reference phase difference, and the cooling capacity of the compressor is decreased when the calculated phase difference is smaller than the reference phase difference, wherein the cooling capacity of the compressor is defined as the distance between a bottom dead center and a top dead center; detect a driving rate of the linear motor based on a time duration for which the linear motor has been driven (Ton) and a time duration for which the linear motor has been stopped (Toff) for a predetermined time period; and change the reference phase difference based on the detected information, wherein the reference phase difference is decreased, if the detected driving rate is larger than a first reference driving rate. a piston which reciprocates in a cylinder; a linear motor configured to provide a driving force to move the piston; a sensor configured to sense a motor current of the linear motor; and a compressor controller configured to detect information related to a load of the apparatus, in a separated manner from a controller which controls a body of the apparatus, wherein the compressor controller is configured to: calculate a phase difference between a stroke of the piston and the sensed motor current; compare the calculated phase difference with a reference phase difference, and control a driving of the linear motor in correspondence to the detected load, according to a result of the comparison; drive the linear motor such that a cooling capacity of the compressor is changed according to the result of the comparison such that: the cooling capacity of the compressor is increased when the calculated phase difference is larger than the reference phase difference, and the cooling capacity of the compressor is decreased when the calculated phase difference is smaller than the reference phase difference, wherein the cooling capacity of the compressor is defined as the distance between a bottom dead center and a top dead center; calculate a phase difference between a stroke of the piston and the sensed motor current; compare the calculated phase difference with a reference phase difference, and control a driving of the linear motor in correspondence to the detected load, according to a result of the comparison; drive the linear motor such that a cooling capacity of the compressor is changed according to the result of the comparison such that: the cooling capacity of the compressor is increased when the calculated phase difference is larger than the reference phase difference, and the cooling capacity of the compressor is decreased when the calculated phase difference is smaller than the reference phase difference, wherein the cooling capacity of the compressor is defined as the distance between a bottom dead center and a top dead center; the cooling capacity of the compressor is increased when the calculated phase difference is larger than the reference phase difference, and the cooling capacity of the compressor is decreased when the calculated phase difference is smaller than the reference phase difference, wherein the cooling capacity of the compressor is defined as the distance between a bottom dead center and a top dead center; detect a driving rate of the linear motor based on a time duration for which the linear motor has been driven (Ton) and a time duration for which the linear motor has been stopped (Toff) for a predetermined time period; and change the reference phase difference based on the detected information, wherein the reference phase difference is decreased, if the detected driving rate is larger than a first reference driving rate.