Thought Police is some kind internal Party Secret Service. Their job is to control and assure that Party Members are loyal not only with their acts; they should be loyal with their thoughts also. After all, act is a result of a thought.
Thought Police is everywhere and controls everything and everyone. They are also hidden in Proles, although they are not interested in catching Proles because Proles are too stupid even to think.
They use all kind of traps: verbal; like O'Brien's try of conversation with Winston; or physically like old shop etc. They are tracking members everywhere, waiting for some their wrong move so they can caught them and put them in Room 101.
Winston believed that there was something before Party but he was not sure what. Members of Thought Police, who are so loyal and smart to know that there is no such a thing like pre-Party; knew what those rebellions like Winston thinks so they made a perfect trap, just the one like it is in Winston's head. After that, it was easy to catch him. If someone had some other doubt, they would act same like they did in Winston's case.
Quis custodiet ipsos custodes or Who watch the watchers? Nobody. Members of Thought Police and highest members of Party will never have doubts in Party and Big Brother and that's the reason Party will stand forever.