By teaching it to heel? I don't mean to be flippant, but the only time my dogs get tangled is when they have freedom to zoom around and do what they please. When they are walking with good leash manners, self-tangling is pretty rare.
You didn't say the age of your pup, but if it's old enough, perhaps it's time to start gently teaching leash manners?
OP if you mean tying the dog outside of your home then there is no fool proof way to stop the dog from tangling in the line, I would suggest being out the with the dog at all times! You could also do the whole "laundry line" thing where you buy the cable and tie it to two trees and then another one attaches to that cord and attaches to the dog so the line is above the dog and prevents tangling but you still need to supervise the dog.