You'll need to unlock the phone, first of all, so it will work with a non-Vodafone SIM:
http://www.htcsimunlock.com/htc-desire-unlock.html
The Desire will automatically configure itself for the appropriate APN when you insert an AT&T or T-Mobile SIM.