First off hit the Apple Developer Connection website and register for an iPhone Developer Account, you can download the iPhone SDK (weighing in at 2.3gb) without paying the $99 / £59 but if your going to develop for the iPhone and you've got one or an iTouch you might as well do the whole thing. The licence lasts 12 months after which you need to renew each year and you'll get all the cool beta kits.
Once you've registered, paid the money, downloaded the SDK and installed it let's move on.
While on the site, you'll need to create your team, get your iPhone device ID registered, then generate your Development certificate and Distribution certificate; along with your provisioning profile files.
Once you've downloaded them, install the Key files (has the .cer extension) into your KeyChain (double-click the downloaded key files); should ask you for your user password to install them in.
Important bit next.
Download the Apple World Wide Developer RCA file http://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double-click that to add it to your KeyChain, this should turn your Developer & Distribution certificates green and active.
Fire up Keychain Access, select the Login keychain, and My Certificates; you should see your Developer & Distribution iPhone certificates, select them and they should show green ticks with This certificate is valid.
Make sure their trust level is Use System Defaults and they're in the Login keychain, either of these three things don't happen and you won't be able to deploy to your iPhone / iTouch device.
Another important stage, make sure your iPhone / iTouch is plugged in, fire up XCode and click Window / Organiser; here you'll be able to deploy your provisioning certificates to your device. Select IPhone Development / Provisioning Profiles and drop in your two profile files into here, select Devices and your device and in the central area you should see those two profiles now copied and embedded into your device.
Next up with XCode running and your iPhone app built;
This will now build your app and send it to your device.
If all goes well, put your feet up, you've just done one of the hardest tasks of IPhone app development; well done!