The coefficient of performance (COP) is a measure of the efficiency of a heat pump or refrigerator in converting electrical or mechanical energy into thermal energy transfer. It quantifies the ratio of useful heating or cooling output to the required energy input, providing a way to evaluate the performance of these thermodynamic devices.