Impaling as a means of torture and execution isn't exactly what it sounds like. People are impaled to death all the time, but not in the manner that was used as a means of execution. For that special occasion, the person was made a spectacle of in the most brutal and deadly way.
When someone committed a crime against the state, impalement was often used as a warning to others. Crimes against the state included everything from disrespecting the state's responsibility to maintain the safety of its roads by committing highway robbery or even stealing from a grave.
Impaling was done in a variety of ways, but generally, it involved sticking a person through the torso onto a vertical spike, stake, pole, or hook in a manner that wasn't immediately fatal. This meant the person would writhe in agony over a period of several days while they died from their injuries.
The most horrific form of impaling involved inserting the spike into a person's vagina or anus. Over time, gravity would pull their body down as the spike penetrated into their abdomen eventually killing them. Impalement has been practiced across the globe by numerous cultures, but the most famous to use the method was Vlad the Impaler during the 15th century.