Because of the lack in technology, railroads were built by hand by blasting through rock. Despite doing this many times before, Phineas Gage messes up this time, making the tampering iron he had been using, an iron rod, be blasted in his direction in the process.
As a result, the iron rod went straight through Phineas' head and damaged part of his brain, namely the frontal lobe. Although he should have been dead as soon as the injury happened, he still lived. It is debated if this was a blessing or a curse.
Not only did Phineas Gage live, he also behaved normally. Even after a rod going through his head which should have gave him a lot of pain, he was still able to talk, walk, and behave normally with little help, which was shocking for everyone else.
Phineas was taken to Dr. Harlow to heal. Despite the many chances of deaths he has had for about 2 weeks, he seems to be recovering. When he suddenly develops an infection, he recovers successfully thanks to Dr. Harlow's nursing, like how he recovered successfully when he was first taken into his care.
However, despite being physically almost healed, Phineas constantly disobeys doctor's orders, even to the point of going out in the rain when Dr. Harlow was gone. After Dr. Harlow comes to the conclusion that Phineas' humors in his body is not balanced and prescribes very strong medicine, which seems to finally cool him down.
After his recovery, it seems that the incident out in the town wasn't the only time that Phineas was acting strange. He goes from being a friendly and understanding person to an aggressive and rude man. Although he used to be reliable and good at his job, this doesn't seem to be the case after, as he is fired. Even his old friends notice the change in his behavior and decide to not be friends with him anymore. The recovered Phineas doesn't seem to be the same as the old Phineas.