The easiest and most-foolproof way to root the phone is to download the "gingerbreak.apk" (to your SD card) and install it. You will have to enable "install non-market apps" to do this.
Then follow it's instructions (specifically, you need a SD card in the phone and USB Debugging must be enabled) and it will root the phone for you in one click. Takes a couple of minutes.
There are other ways to do this, but they're not as safe or foolproof.