When typing in any application, or when using cut, copy, and paste, you can shake the iPad to undo your typing and shake again to redo. Your iPad will pop up a query to double check you meant to do this, then simply choose from the options.
In iOS 9 and above, you can disable this feature if you find yourself accidentally triggering it while typing. Just open the Settings app and select Accessibility followed by Shake to Undo. Switch the slider to the off position and you won’t find yourself mistakenly deleting text any more!
If you don’t feel comfortable shaking your iPad, you’ll find regular undo and redo buttons on the left of the Quicktype bar, which above the keyboard in iOS 9. For earlier versions of iOS, undo is on the main keyboard and redo is on the secondary keyboard.