The word "though," when it is alone in the middle of the sentence, is surrounded by commas.
...I think he knew, though, that this was the end.
...He was standing, though, near the door.
At the end of the sentence, it takes a comma in front of it.
...He was leaning against it, though.
...I didn't really understand it, though.
When "though" begins a dependent adverb clause, the clause is punctuated according to the rules for adverb clauses.
Happy punctuating!
Margie