There's only one official way to get "legitimate" software for the iPhone 2.0 and iPod touch – via Apple's included App Store. The much-heralded service offers almost 1,000 free and paid application in numerous categories and has been well publicized over the last week.
I recently had to chance to beta test an upcoming iPhone application without downloading it from the App Store. Instead I was able to install it directly to my iPhone via iTunes and it's 100 percent endorsed by Apple. Apple has provided their developers with an Ad Hoc mechanism to distribute their software directly to up to 100 users – circumventing the App Store entirely.
The procedure works like this: a developer will request your iPhone's unique identifier. The Identifier is 40-character string that can be found in iTunes by clicking on the word "Serial Number" under the Summary tab when your iPhone is connected. You can copy the string by pressing Command-C (Control-C on a PC) for easy emailing.
The developer then uses the Identifier to compile a custom version of an iPhone application that will only run on that device. The developer then emails you the application and a special provisioning file named "adhoc_Dist.mobileprovision." The application is installed by simultaneously dragging both the app and the .mobileprovision file to your iTunes library. The application then appears in Applications areas (under Library) and is synced to the iPhone on the next sync.
Very simple and well executed.
Update: Tech Cruch reports that Apple is preparing an App Store beta testing program, but according to the report, betas will be distributed through the App Store as opposed to directly.