Don’t say “For what is that button?” – say “What is that button for?”

Verbs that use prepositions (E.g wait for a bus / look at a movie / listen to a message etc.) keep those prepositions at the end of questions. (E.g. What are you waiting for?”) Watch this movie that explains how it works. Do the exercises that follow the movie.