There are essentially two different ways that you can write applications for the iPhone:
1. Web Applications.
2. Native applications.
Web Applications are applications that run of the Safari browser on the iPhone. These applications are typically web applications with their interface and layout customized to suit the browsing idioms that have emerged for the iPhone.
I use the word 'idioms' specifically to emphasize the fact that web applications need to not only change the layout and appearance to suit the iPhone, but also at the same time rethink usability (not design) to suit the new browsing patterns that have come with the iPhone.
Native Applications are applications that are run 'natively' on the iPhone itself. These applications are developed largely in Objective-C (a variant of the popular C language) and use the iPhone specific features which are exposed using the Cocoa API on the iPhone.