Refrigerator compressors actually require heat to help the refrigerator cool. As the compressor pressurizes gaseous refrigerant, the compressor's temperature increases. The increased temperature actually helps the refrigerant to move into the condenser where it turns to liquid and works to cool the refrigerator.
A Hot Compressor is Normal
Other Symptoms May Indicate a Problem
According to RSM Home Improvement, if your refrigerator has other symptoms in addition to a hot compressor, you may need to call a service technician. If you notice your refrigerator's compressor turning on and off or making strange noises, call a professional.
Use your best judgment. Before you call a service technician to remedy a hot compressor, make sure there is truly a problem. According to RSM Home Improvement, "Normally, compressors are quite hot when they are running correctly. If your compressor isn't turning on and off (you don't hear a clicking sound) the heat of the compressor is probably natural."