Take a man's garment when he has put up security for a stranger, and hold it in pledge when he puts up security for an adulteress. (ESV)
What does it mean to "put up security" and to "hold it in pledge?"
The phrases "put up security" and to "hold it in pledge" both have to due with the system of credit in ancient Israel. Their system was similar to the modern one with one major difference. Today we go to a bank(a business that provides loans), but banking had not been 'invented' yet so a person would have to obtain a loan from someone they knew. Giving someone a loan involved a certain amount of trust, since there is a possibility that it will not be paid back. A "security" or "pledge" was an item that belonged to the person asking for the loan that was given as a deposit which was returned after the loan was paid back.
The passage is a warning concerning people asking for loans that they cannot pay back. "Putting up security for a stranger" meant providing a pledge for someone else's loan. In the modern day, it would be like co-signing on a loan that the other person has no way of paying back, thus leaving you with the responsibility of paying it back.
קַח־בִּגְדוֹ כִּי־עָרַב זָר וּבְעַד נָכְרִיָּה חַבְלֵה
reads: "qach-Big'dô Kiy-ärav zär ûv'ad näkh'riYäh chav'lëhû"
and translated with Strong's Concordance reference in brackets:
"Take  [z8798] his garment  that [x3588] is surety  [z8804] for a stranger,  [z8801] and take a pledge [z8798] of him for [x1157] a strange woman. "
I too had the same questions about word use and visual pics I picked-up in this verse and needed further clarification -- even after reading the above answers.
I questioned right away, "Why would anyone deal with such a high-risk person? Why not leave him to his own folly?"
Let me note, I know very little of Hebrew culture. But what came to my mind in thinking about this troublesome verse was the story of Judah and his daughter-in-law, Tamar, as told in Genesis 38, specifically verses 12 through 26:
"...12 Now in the process of time the daughter of Shua, Judah's wife, died; and Judah was comforted, and went up to his sheep-shearers at Timnah, he and his friend Hirah the Adullamite. 13 And it was told Tamar, saying, "Look, your father-in-law is going up to Timnah to shear his sheep." 14 So she took off her widow's garments, covered herself with a veil and wrapped herself, and sat in an open place which was on the way to Timnah; for she saw that Shelah was grown, and she was not given to him as a wife. 15 When Judah saw her, he thought she was a harlot, because she had covered her face. 16 Then he turned to her by the way, and said, "Please let me come in to you"; for he did not know that she was his daughter-in-law. So she said, "What will you give me, that you may come in to me?" 17 And he said, "I will send a young goat from the flock." So she said, "Will you give me a pledge till you send it?" 18 Then he said, "What pledge shall I give you?" So she said, "Your signet and cord, and your staff that is in your hand." Then he gave them to her, and went in to her, and she conceived by him.
19 So she arose and went away, and laid aside her veil and put on the garments of her widowhood.
20 And Judah sent the young goat by the hand of his friend the Adullamite, to receive his pledge from the woman's hand, but he did not find her. 21 Then he asked the men of that place, saying, "Where is the harlot who was openly by the roadside?" And they said, "There was no harlot in this place." 22 So he returned to Judah and said, "I cannot find her. Also, the men of the place said there was no harlot in this place." 23 Then Judah said, "Let her take them for herself, lest we be shamed; for I sent this young goat and you have not found her."
24 And it came to pass, about three months after, that Judah was told, saying, "Tamar your daughter-in-law has played the harlot; furthermore she is with child by harlotry." So Judah said, "Bring her out and let her be burned!" 25 When she was brought out, she sent to her father-in-law, saying, "By the man to whom these belong, I am with child." And she said, "Please determine whose these are--the signet and cord, and staff." 26 So Judah acknowledged them and said, "She has been more righteous than I, because I did not give her to Shelah my son." And he never knew her again."
Let me provide pre-text in summarizing Genesis 38:1-11:
Judah, (after convincing his brothers to sell Joseph to Ishmaelites) journeyed to Caanan, taking up permanent residence, settling in and marrying. Fathered three sons. The eldest son Er married Tamar (Caananite). He died, leaving her childless, and as was custom, the second eldest Onan took her to wife, but refused to reproduce children with her. Onan dies. Judah, sends Tamar back to her father promising his youngest son Shelah once he is matured for marriage. Judah fully reneges on that promise. Leaving Tamar a young, childless widow (a destitute future if I understand correctly).
Now, although this story doesn't seem comparable to the scripture, it helps me to understand the context of the words 'surety', 'pledge', 'strange woman'. Thereby giving context to the verse, and, if I may paraphrase using Judah as an example:
Cover your brother's back when he has shown he has no discernment to keep himself from bondage to strangers.
Clearly there are so many lessons to glean from this verse and the drilled down study of it. The standout lessons, to me, are: forgiveness; redemption; Grace.
Through Judah, comes Yeshua.
The sage is advising his young protege to require collateral for a loan to a stranger or a fool. A loan protected by collateral is a "secured loan".
An unsecured load to someone who is going to use it to benefit a foreigner or to fund his reckless living is foolish.
Deuteronomy 15 provides several rules and conditions relating to lending and several of them are deeply connected to the sanctions of the Torah and are extremely interesting!
Another example why English translation Bibles (like the KJV) cannot be trusted.
take his garment
כי ערב זר
that makes strange/alien promises/pledges
and (who) consequently
foreign-female is his bondage
Meaning: Someone who makes unusual (perhaps not being able to fulfill them) promises and whose consequence is bondage to strange women, might as well take his clothes (as he probably would lose them anyway).