1. There are 4 ultimate realities: thoughts, mental factors (cetasika), matter (rupa), and Nibbana. The first three belong to “the world”, and when one escapes from the world one attains Nibbana:
The Grand Unified Theory of Dhamma – Introduction
2. Thus thoughts about the material world cease when an Arahant attains Parinibbana or anupadisesa Nibbana. It is also experienced with Nirodha Samapatti.
3. However, one cannot attain Nibbana by forcefully suppressing thoughts. That will lead to rebirth in the Asanna realm, since avijja is not removed.
One needs to think clearly and mindfully to attain Nibbana. As Johnny says, one needs to realize the real nature of this world by contemplating on the Tilakkhana, the three characteristics of nature. Those are revealed only by a Buddha, and thus one needs to come across the correct meanings of them first:
Anicca, Dukkha, Anatta