[sentence],总之,[conclusion]
总之 opens a clause that gathers up what came before into one conclusion. It stands at the head of its clause, usually followed by a comma, and works in speech and writing alike.
After a list of points, 总之 states what they add up to.
In conversation, 总之 also brushes the details aside, like "anyway" or "whatever the reason": the speaker skips the explanation and goes straight to what matters.
总之 comes after something has been said. It can't introduce the first point of a talk or an essay.
总而言之 says the same at greater length and formality, and has its own entry.