Text input onchange

I’m not sure how to do this, I searched search engines and looked through kirupa and couldn’t find anything.

All I want to do is simply run a function everytime a key is typed in a text input.