A thesis statement is a sentence that states the main idea of an entire piece of writing, from an essay of a few paragraphs to a doctoral dissertation or a scholarly book. It is to such a piece of writing what a topic sentence is to a paragraph.
In a short essay, the thesis statement (also called simply the "thesis") should be in the first paragraph--ideally, at the end, with two or three sentences before it to catch the reader's attention and lead up to it. Then the topic sentence of each body paragraph should, implicitly at least, refer back to the thesis statement. Finally, the conclusion should pull together the points made in the body paragraphs and restate, in different words, the idea of the thesis.