There are two ways to undo in Texpad.

Shake to undo: the standard iOS shake gesture will open the following

iphone-undo

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:

ipad-undo-texpad-keyboard

The Regular keyboard:

ipad-undo-regular-keyboard