You can register for free for apples iphone dev program. It gives you access to the SDK for the last firmware of the iphone, all associated development tools, and an iphone simulator. You just need to have a mac and some programming know-how.
As for access to the new 3.0 SDK, or to actually be able to test your programs on actual iphones and ipods, or to sell the app, you must pay $99.
"Phone SDK for iPhone OS 2.2.1
Registered iPhone Developers can download iPhone SDK for iPhone OS 2.2.1 which includes the Xcode IDE, iPhone simulator, and a suite of additional tools for developing applications for iPhone and iPod touch."
developer.apple.com/iphone/