There are two ways to undo in Texpad.
Shake to undo: the standard iOS shake gesture will open the following
Undo button: Both the Texpad and Regular keyboards have an undo button on the numbers pane, and a redo button on the symbols pane.
The Texpad keyboard:
The Regular keyboard: