Usually it is the switch on the side of the compressor. Called by different names, but basically the starter relay/thermal overload assembly. They are $30-$60 and the most common reason that refers stop cooling.

Clean the fan and coils annually and refrigerators last a LONG time. If the thermal protection has been cycling frequently, eventually the bi-metal tab breaks (unit will rattle) and will have to be replaced, but it is pretty simple to do.