How are the questions in IQ tests formulated? I would like to know how psychologists come up with the questions they include in an IQ test and how they know that those questions will accurately measure intelligence? How has it been proved that IQ tests do indeed work?
Alfred Binet developed the first intelligence measurement with some psychological validity. He asked general psychological questions from groups discovered by Spearman of varying difficulty based in the (not yet discovered) concept of fluid intelligence to children. Some did well some did not. This led to an age standardized test called the Stanford-Binet Intelligence Test. Which essentially was problems of varying difficulty tested on many different children of diverse backgrounds to create a baseline. Results were grouped by age in order to give a predicted evaluation of common performance ability. 

IQ tests do not work as a measurement of success and no one thinks that they do. They do work as a measurement of specifically identified and labeled cognitive ability. They are more useful psychologically in identifying cognitive problems to give treatments or accommodations than providing congratulatory measures to those who perform well.