I have used this many times when applications freeze, and neither the Home button nor the Lock button have any effect.
If this happens, try double-tapping the Home button to invoke the Home button shortcut. My double-tap shortcut is for the iPod, but this also works with Phone favorites. By starting the Phone app, or the iPod app, the iPhone kills the hung application.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20081230170340626