Look at the "Desire All Things Root Guide" sticky post in this forum. This has links to a couple of rooting guides, as well as other useful information. Personally I'd use Revolutionary to root a Desire.
Don't use the official HTCDev unlock, because it gives you fewer options than the community methods (you cannot get S-Off if you do that).
This all assumes you mean "rooting", because the word "unlock" is ambiguous. If you mean "SIM unlock" (so you can use different carrier's SIMs) that's something completely different and unrelated. If that's what you meant let us know and I'll find the unlocking utility (there's freeware at XDA will do that, no need to pay anyone for a code).