Post traumatic stress disorder (PTSD) is a disorder people sometimes suffer when they go through a terrible and intense experience, such as a war, violent abuse, or a disaster. It was first discovered based on the reactions of some soldiers to terrifying wartime experiences, and they originally called it shell shock. So essentially, PTSD and shell shock are the same thing, although the term shell shock is generally only applied to wartime situations, while PTSD is applied to almost any kind of traumatic stress.
There was a gradual evolution between the concepts of PTSD and shell shock, and at first, the condition was simply considered a form of cowardice. During the 1800s and earlier, soldiers dealing with these kinds of symptoms were simply executed. The generals, who had no real understanding of mental illness or ideas like PTSD and shell shock, thought that executions would serve as a deterrent to keep soldiers from succumbing to their fear.
World War 1 was the first conflict where experts realized the existence of the mental condition that would later be known as PTSD and shell shock. The number of mental problems increased significantly compared to previous wars, and experts tried to figure out what was going on. Initially, psychiatrists at the time thought the increase was because soldiers were reacting to the loud explosions of new kinds of ammunition and bombs, or perhaps even the air pressure from the explosions. This is why they called it shell shock. There were still a lot of executions for cowardice during that war, and many generals where fairly skeptical of the whole concept of shell shock.
As time passed, experts gained a better understanding of post traumatic stress. As a result, they were able to take efforts to prevent it from happening in the first place, and subsequent wars resulted in fewer cases. They also started to understand that the condition had a tendency to linger for a long period of time after a war was over. Some war veterans would actually have symptoms for their entire lives, although most gradually learned to deal with them more effectively with treatment.
Eventually, experts realized that post traumatic stress wasn't merely confined to wartime experiences. They started to understand that nearly any kind of extremely traumatic experience could cause people to suffer with the same symptoms, and those people would often respond to the same kinds of treatments.