Origin
This was derived from the fables of Phaedrus in the first century AD.The actual wording appears in English from the middle of the 18th-century in 1748.
Explanation
It is said when you feel that someone has made a bad situation worse by doing something else to upset you. It means to make a bad situation worse, to hurt the feelings of a person who has already been hurt, to further a loss with mockery or indignity, to worsen an unfavourable situation. It means to embarrass the hell out of someone or insult him as well as hurt him in some way, usually as an afterthought. Secondly, there is “add salt to the wound/pour salt on the wound” which, as you can imagine, stings painfully, and refers to someone rubbing someone else’s face in it when he has been wounded in some way. The only difference between the two is that with the first, the one person both insults and injures, whereas in the second there may be more people involved – one wounding, one adding salt to the wound. They are two very similar expressions and to most extents and purposes mean the same thing.
Examples
First, the basement flooded, and then, to add insult to injury, a pipe got burst in the kitchen.
My car barely started this morning, and to add insult to injury, I got a flat tyre in the driveway.
The airline charged me extra for checking in a bike and then added insult to injury by charging me for a box to pack it in.