As the others said, graphics cards come with coolers preattached.
Here's a picture on how that works:
From back to front:
Backplate - Not on every card, Cools vRAM and looks good.
PCB - Has all the electrical components on it, including the actual GPU
Reinforcement - Not on every card, reinforces the PCB when you have heavy coolers.
Heatsink - The metal structure that takes up the heat the vRAM, VRM and GPU produce
Fans - Move the heat from the heatsink away into the case.