How does mining pool ensure the miner works on the problem?
Miners regularly send "shares" to the pool server. The shares are solution to a low-difficulty bitcoin puzzle. Each share stands some chance of being a solution to the current bitcoin puzzle, of much higher difficulty.

By sending shares, miners show that they are working on the problem, and may potentially reveal its solution to the pool server. They are often remunerated based on the number of shares they find, and of their difficulty.