Significantly, it is when a person crosses from North to South Korea in the demilitarised zone that bullets may fly. This is because I think there has only been one occasion when someone breached the zone in the other direction. This was said to be a man wishing to gain information.
I don't know what happened to him. the recent crossings have been of low level soldiers trying to get to th South. One was hurt badly by the shots but another was not, and there seems to be only a restricted appetite for so punishing those who wish to be in the South.
If a soldier or a civilian is detected in the DMZ, their fate is basically determined by which country catches the person. If South Korea catches the person, they will likely be deported, if they are not a Korean citizen. This happened in 2017 to a man from Louisiana who was caught trying to enter North Korea from South Korea.
He claimed he wanted to help resolve tensions on the Korean Peninsula. If a soldier or civilian is detected in the DMZ by North Korea, they are immediately shot. This too happened recently. A North Korean defector trying to escape was shot and wounded.