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.
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 is above the keyboard.