When someone thinks on his/her feet, he/she reacts very quickly to a situation. You mean that he/she is mentally alert. Especially in a situation when things are happening very quickly.
Example: The reason why Priya is being sent to represent the company is because my boss feels she has the ability to think on her feet. * Ganpat prides himself on his ability to think on his feet.