also, when you buy a retail CPU, it already comes with a fan screwed into the heatsink. It's like one assembly and then you have the nice CPU off to the side. With you, I wouldn't bother with aftermarket stuff. Especially if you are new at this. Just get the stock retail CPU whether it's Intel or AMD. The thermal compound is always stuck on the bottom of the heatsink waiting for you to mount it on the CPU.
Heatsinks only go on top of microprocessors, ie, CPU, GPU. RAM use heatspreaders which has a similar function to heatsinks.