The purpose of the heat sink in a computer is to keep the heat away from the CPU.
The heat sink dissipates the heat generated by the CPU and moves the heat away from the CPU.
The fan on the CPU heat sink also helps to keep the CPU at a cool enough temperature so it's not damaged.
Without the heat sink the computers CPU would get too hot and be damaged.