Generally, the thesis should be in your introduction, often toward the end of it. This allows you to introduce the topic, give context to the subject and then narrow to your specific thesis, your what and why. In longer papers, the thesis or claim might be a short transitional paragraph towards the beginning of the paper.
Keep in mind that once your thesis statement is given, everything in the body of the paper should be focused on supporting and developing it—nothing should go beyond it. That’s why you may sometimes need to rewrite your thesis several times as you are drafting and revising.
The main idea of the thesis also appears in the conclusion, in some way—it is the take-away, the “here is what you need to remember from this.”