The air conditioning system has a radiator on the outside of the cabin called a condenser (or condensing coil). In an ICE, that is cooled by the airflow going through the front of the car and assisted by a fan. That fan can either be electric or powered directly from the motor. A Tesla also has a condensing coil and an electric fan to assist pulling air through.
The compressor is a pump mounted on the engine, typically powered by a belt that is moving the refrigerant through the system. In a Tesla, this is a sealed electric unit. More similar to a home air conditioner. In both cases, the compressor is cooled by ambient air around it and the refrigerant going through it.
Inside the car is an evaporator coil. There is a fan that blows air through the evaporator and then into the cabin. This is the same on Tesla & ICE.