How is the border of North Korea and South Korea defined?

There is a very large fence running along the 38th parallel.