The DMZ is a kind of buffer zone between the two Koreas. It spans 1.2 miles of territory on either side of the line of armistice – the de facto border between the two states that runs along the 38th parallel line – and is not technically part of either country.
The division of the peninsula along 38th parallel goes back to the end of World War II. At the Potsdam Conference in 1945, the United States and the Soviet Union agreed to divide the administration of Japanese-occupied Korea: the Soviet Union would manage the north and the US the south. The division was meant to be temporary. However, two ideologically opposed regimes emerged on either side – a Western-allied government under Syngman Rhee in the south and Kim Il-Sung’s Communist regime in the north – and the peninsula was effectively partitioned.