"If at any time you either type or paste something in by mistake, Apple has added a gimmicky yet semi-cool undo feature — just shake your iPhone to call up an Undo, Redo, and Cancel dialog."
First time I had read about this. Works in Tweetie, Birdhouse, Mail, etc. via iPhone 3.0 Software Walkthrough