On Intel systems the chipset determines the memory type, on AMD systems
it's the CPU.
I take it from your second question that you don't have a motherboard yet.
If that's the case you want to make sure that you get a motherboard that
supports both the Pentium D and the Core2 so you can upgrade the CPU
later. The Pentium D is a dreadful processor, the Core2 is light years
ahead of it. Fortunately they are both socket 775 so you should be able to
get a motherboard that's compatible with both of them. The mainstream
Core2 motherboards use the 965 chipset, the 975 chipsets are also
compatible. DDR2 533 will be fine if you don't intend to overclock, if you
do want to overclock then you'll need 667 MHz or better. This is a side
effect of how the chipsets and CPUs are clocked. The CPU and the chipset
share the same source clock. There is only a limited number of memory
clock multipliers available so the effective clock rate to the RAM will be
either 533, 667 or 800 times the overclock ratio. If you have 667 RAM then
you can use the 533 x Overclock ratio and you'll still be within spec.
A final note on overclocking, I doubt you'll be able to do much with with
the Pentium D. The Core2 has lots of headroom, I'm running my 2.66GHz
Core2 at 3GHz and it's completely stable.