Both guidance computers (command module and lunar module) were essentially the same. They were the first flight computers built with integrated circuits, all dual 3-input NOR gates. The top sides of the chips were attached to "cold plates" which were attached to extruded aluminum "cold rails" which had channels for a glycol coolant to flow through. The primary and backup coolant loops were part of the ship-wide environmental control system:
184.108.40.206 GN&CS - ECS Interface.
The Environmental Control Subsystem (ECS) provides thermal stability for the temperature-sensitive electronic equipment of the GN&CS. The electronic equipment (except the IMU) is mounted on cold plates and rails through which ECS coolant (ethylene glycol-water solution) is routed to remove heat. To cool the IMU, the coolant flows through its case. The heat that is removed from the equipment is vented overboard by the ECS sublimators.
Apollo Operations Handbook: Lunar Module
Although the paragraph quoted above is for the lunar module, the command module has the same computer and glycol cooling loops.
Interestingly, the early plan for Apollo was to carry spare computers that the astronauts could swap out in case the computer failed. However, during testing, the above-noted liquid coolant would leak and was difficult to re-seal. This contributed to the decision to keep the computers permanently wired (along with weight considerations and the excellent reliability of the hardware). The swapable units that were already built were used on the unmanned Apollo test flights, with hardwired units for all of the manned flights.