To think on your feet means to be able to think and react to things very quickly.

Even though preparation is vital, you might have to think on your feet when you are taking part in a seminar.