Comment first, name later
In speech you often start with your comment and use a pronoun for the thing you mean. Then, after the sentence is complete, you name it in full. This is Rechtsversetzung (right dislocation). English does exactly the same: It was expensive, that car.
The same statement, plain and dislocated
Dieses Auto war teuer.
This car was expensive.
Neutral information.
Das war teuer, dieses Auto.
It was expensive, that car.
The verdict comes first. The noun follows as a reminder.
What it does
Rechtsversetzung puts the evaluation or the news first, where it gets the attention. The noun at the end is old information: both speakers already know what is meant. It also repairs a pronoun that might be unclear.
Ich kenne ihn gut, den Peter.
I know him well, Peter.
Akkusativ: ihn, den Peter.
Die ist echt nett, deine Kollegin.
She's really nice, your colleague.
Ich hab ihm schon dreimal geschrieben, dem Vermieter.
I've written to him three times already, the landlord.
Dativ: ihm, dem Vermieter.
Das war keine gute Idee, mit dem Auto zu fahren.
It wasn't a good idea, taking the car.
A whole infinitive clause can stand at the end.
The Nachtrag: adding a detail
A Nachtrag (afterthought) also comes after the finished sentence, but it adds new information: a time, a place, a correction or a more precise version. There is no pronoun waiting for it. Typical openers are und zwar (namely, to be exact), also and genauer gesagt.
Ich hab sie gestern getroffen, im Supermarkt.
I ran into her yesterday, at the supermarket.
Wir fahren morgen los, und zwar um sechs.
We're leaving tomorrow, at six to be exact.
Das Projekt kostet mehr als geplant, genauer gesagt doppelt so viel.
The project costs more than planned, twice as much, to be precise.
Repeat or add?
Rechtsversetzung: names what the pronoun meant
Der ist laut, dein Hund.
He's loud, your dog.
Nachtrag: adds something new
Dein Hund ist laut, vor allem nachts.
Your dog is loud, especially at night.