Not technically feasible.
iPhone apps only run in the foreground.
You can't run an app in the background on iOS and you can't have your app get accelerometer or gyro events unless it's in the foreground.
Normally an iPhone will power down if left idle for a short amount of time.
There are tricks to prevent it from doing that, but then your battery runs down very quickly.
Essentially, the best you could hope for is an app that will detect if the iPhone drops within an hour or two (or whatever the battery life of a continuously running iPhone is) -- or you could detect it indefinitely while the iPhone is plugged into a charger. Neither is particularly practical.
If you just want to find out how to access the accelerometer, you can google "iPhone accelerometer tutorial" you'll find lots of examples of how to access it, here's one:
http://www.switchonthecode.com/tutorials/iphone-tutorial-reading-the-accelerometer[
^]
As a practical application, though, it won't work on the existing iPhone.
It might be something that could be done on Android -- I haven't developed for Android, but you may be able to run a background/low-power app in that environment.
Of course, you still have the problem as other people said of determining the difference between the phone falling and a person falling. Perhaps, if the phone falls, the app could activate and give the person a certain amount of time to hit a button to indicate he is okay -- and if he isn't okay it sends a text message to someone to alert them. (I'm not sure if alerting emergency services is appropriate if the cat knocks the phone off the table and no one is there to turn the app off...)