What does it mean for the purpose, thesis or main idea, introduction and conclusion to all work together?
They should all reflect what you actually do in your paper, and what you do in your paper should fit the assignment.
Sometimes a paper starts in one place but ends up somewhere very different. If this happens to you, you are not done until you revise your thesis and introduction so that they reflect what your paper actually does, rather than what you thought it was going to do. For example, if you say in your introduction that you are going to address points a, b and c, but your paper actually covers points in the order c, a and b, change your introduction to reflect what you do in the order you do it. Likewise, your conclusion should conclude all of your paper, not just the last few pages.