have it touching the side of the core and use some scotch tape to attach it to the cpu package. If it's the flat kind, you can trim off the tip to get a better reading, but be careful not to cut the wire or it won't work. A little dab of Arctic Silver will also help transfer heat to it and give an accurate reading.
**DO NOT put the sensor between the cpu and heatsink.**
Might depend on the CPU also, if you have a p4 im not sure if its better to have it next to the edge of the heatspreader or to have it under the CPU, in the hole between the CPU and the core. This might give a more accurate wiring (thread the wires through the pins so the sensor is in the middle).