There are two general approaches to formatting a site for a PDA like iPhone vs. a conventional
1) Use an iPhone template and framework and create an alternate site that way - the user agent is detected at each page load to determine which site the user sees.
Information here - read comments on that page for server side solutions
2) Through CSS create a custom stylesheet - loaded based on the user agent, the same process developers use for a "friendly print" page or accessibility device like a screen reader based on the media type. This is preferred when an existing site exists, you're not starting from scratch.