Both thesis statements and topic sentences help your audience understand the structure and main ideas of your essay. They differ in a few ways.
1) The thesis statement belongs in the introductory paragraph, while topic sentences belong at the beginning of body paragraphs. An essay will have just one thesis statement, but the number of topic sentences depends on the number of body paragraphs.
2) A thesis statement provides an overview of your entire essay. It contains your claim and your reasons.
Thesis statement = claim + "because" + reasons
Example: Capital punishment should be outlawed because it is immoral and does not deter crime.
claim: Capital punishment should be outlawed
reason #1: it is immoral
reason #2: it does not deter crime
3) A topic sentence tells your reader what the paragraph is about. Each reason in your thesis should correspond to a body paragraph.
Example: Capital punishment is immoral.
I know from reading this topic sentence that the paragraph will discuss how capital punishment is immoral.
Bonus Tip: Always revisit your thesis statement before submitting your essay. Make sure the reasons in your thesis match the reasons in your body paragraphs! Often writers will include reasons in their thesis statement only to find that their reasons evolve as they research and write their body paragraphs. If the reasons in your thesis statement don't match the reasons in your essay, your audience will become puzzled and frustrated.