This phrase comes from boxing. When a boxer is too beat up to continue, his coach throws a towel into the ring to signal that the fight is over.
1) The company threw in the towel after losing all of its major customers.
2) Mike 'Boom Boom' DeNola threw in the towel after three rounds. He'll probably have to spend a few days in the hospital, followed by a long convalescence in Miami.
To give up or surrender. Probably related in origin to throwing up the white flag, which also indicates surrender.
When I was losing by 5 in the game of Don't Throw The Towel in the Bucket with a minute remaining, I realized it was hopeless and decided to just throw in the towel.