Heatsinks transfer the heat from a device, such as a CPU. Then the air current caused by your fans passes over it, taking the heat away from it. Some devices dont need heatsinks, but others do. Are you talking about the CPU heatsink?
And if you bought an aftermarket one, it would depend on the quality and design of it. Some can cool much better then the stock, while others are only on par with stock.