結局 means "in the end", "after all": after the back-and-forth, this is how things turned out. It goes at the head of the clause, or just before the verb, and works in speech and writing alike.
、。
In the end, he didn't come.
、。
I thought it over a lot, but in the end I gave up.
、。
We talked for three hours, and in the end nothing was decided.
The outcome is often not what was planned, which gives 結局 a resigned tone, but it can be neutral too.
、。
I agonized over it, but in the end I went with the original plan.
結局 or ついに
and
mark something that finally happened after a long wait. 結局 marks how things settled, and the result is often less than you hoped for.
。
My dream finally came true.
、。
I looked for a cheap one, but in the end I bought the expensive one.
Usage notes
These go beyond saying how something turned out.
Summing up
結局 can also give the bottom line of a situation: "when it comes down to it". is the more formal form.
、。
At the end of the day, what matters is your health.
、。
When it came down to it, it was a question of money.
In a question
In a question, 結局 asks how something ended up.
、。
Did you end up seeing that film?