When you thrown in the towel, you decide to stop doing what you have been attempting to. You decide not to pursue the matter. You just give up. In other words, you quit doing what you were doing.
Examples: Although Nadal lost the first two sets, he didn’t throw in the towel.* Amru has been working on the problem for two days now. He refuses to throw in the towel.
It is also possible to say, `throw in the sponge’. Example: When things didn’t go according to plan, she threw in the sponge.
The idiom `throw in the towel’ comes from the world of boxing. During a fight, the boxer’s trainer/manager stays with him. In between rounds, he gives the fighter water, tells him what his opponent is doing, wipes the sweat and blood off the boxer’s face, and he uses a sponge or a towel to do this. If he feels that his fighter is taking too much punishment, he may decide to call the fight off. This is to prevent any serious injury. In order to stop the fight, what the trainer/manager does is to throw the towel or sponge into the ring. This is a signal to the referee that he wants the fight to be stopped.