The people of North Korea are not even allowed to travel within their own country without official permission. If a North Korean citizen was caught attempting to make his or her way from one part of the country to another without the proper documentation, that person would be in a heap of trouble. Not to mention that North Korea is practically devoid of anything even resembling a transportation network. The few roads that exist are designed to enable the military to travel from one place to the next and to move freight. There are few railroads, practically no passenger trains and even fewer private vehicles so even if North Koreans were permitted to travel, it would still be quite difficult.
Some North Koreans can in fact leave the country. The sons and daughters of the elite are permitted to travel and some even study abroad. Representatives and diplomats of the North Korean government are also permitted to travel outside of North Korea. When the son or daughter of a high-ranking party official leaves the country, the person's return is almost guaranteed because everyone is well aware of what happens to the family members left behind when someone defects. The same is true for the representatives of North Korea when they travel - their primary goal is to solicit funds for North Korea's impoverished regime. They offer to sell goods, they discuss business ventures, etc. But their families are back in the D.P.R.K. so they always return when the business is concluded. North Korean diplomats always travel in pairs and each is instructed to keep a close eye on the other. Again, their wives and children and extended families are back in the North so they can be relied upon to return. Smaller numbers of scientists have been known to travel abroad to study and also to teach scientists elsewhere about things such as rocket technology or how to manufacture biological weapons from disease cultures. North Korea also sends its counterfeiters and drug smugglers abroad on state sanctioned business.
For average people, the only realistic hope for getting out of the country is to make it across the border to China. And even if they succeed in doing that, there's no guarantee that the person will make it safely to South Korea. The Chinese, concerned about an influx of North Korean refugees, have implemented policies that require them to return all illegal North Korean defectors. Many of those North Koreans to attempt to escape wind up as slave laborers, sex slaves or are simply beaten or killed. But escape attempts are at some of their highest levels since the famine of the early 1990's so it's evident that many people are willing to risk their lives an to sacrifice everything for the hope that they can achieve their dream of living a better life.