This is an excellent question. There is no set formula, but there are usually three general rules to follow. First, the last sentence of a paper should complete the idea of the paper. In short, it should act as a conclusion to the thesis. For example, if you are writing on the importance of conserving oil, then write something that encapsulates that idea in that last sentence.
Second, do not introduce something new in the conclusion. You never want to do this. You do not want your reader leaving with a new idea or a different thought. The final paragraph and sentence should bring your reader back to the thesis of the essay. You want them to think that your thesis is cogent and well-argued. It is their last impression of your work. So, end off reiterating your thesis.
Third, with all that said, I am not suggesting that your last sentence should be a robotic summary of your thesis. Of course, you can make it creative. Do so, but keep to your main point.