Pentium D is a dual core processor, while the Pentium 4 HT is a single core that is capable of running two software threads. More simply put, The Pentium D is 2 people each pulling their own wagons, the Pentium 4 HT is one person pulling 2 wagons with lubricated wheels.
Over all, the Pentium D is better because it is truly dual core, although the Pentium 4 does a great job of trying.