Consider normal conversation from people in today's culture. We use a variety of expressions and methods to portray what we mean. These are known as idioms. Different cultures and eras make use of different idioms. We use things such as hyperbolic language (exaggeration), poems, stories (parables), songs, dictation, legal presentation, humor, etc. These are all methods in which we aim to get across the particular meaning of what we are expressing. The Bible is no different in this regard. For this reason, having some familiarity of the culture of that era will help the meanings of passages to become more vibrant and jump out at you rather than seem obscure and confusing.
To answer my leading question about taking the Bible literally or figuratively: we are to take it literally however, it must be taken literally with regard to the specific type of literary genre that makes up the part in which we are reading. For example, when Jesus says he is "the door" we are not to think that he is made of wood and has a doorknob. It is a metaphor and that is how we are to literally take it. We are to go to him because he is the means of entry into XYZ.
Here is another example:
"If your right eye makes you stumble, tear it out and throw it from you; for it is better for you to lose one of the parts of your body, than for your whole body to be thrown into hell."
— Matthew 5:29 NASB
The verse above is not intended to be taken in a literalistic fashion, but rather it is expressing that if something is causing us to stumble in our relationship with God — we must remove that something from our life, even if it is something very close to us (metaphor: tear out your eye).
Now regarding the verse to which was alluded in the title of this article: Matthew 5:38.
“You have heard that it was said, ‘An eye for an eye, and a tooth for a tooth.’ "
That verse is a reference to three other verses found in the 1st Covenant (Old Testament):
Exodus 21:23, Leviticus 24:20, Deuteronomy 19:21
It is of prime importance when trying to understand various parts in the Bible that we use the clear and easy to understand verses, to help us to interpret the other verses that are more vague or difficult to understand. This process makes the whole project of wrapping our brain around the difficult to understand verses a much easier endeavor.
To that end, I believe the Deuteronomy passage mentioned above is the most clear about the intention of its meaning.
"The judges shall investigate thoroughly, and if the witness is a false witness and he has accused his brother falsely, then you shall do to him just as he had intended to do to his brother. Thus you shall purge the evil from among you. The rest will hear and be afraid, and will never again do such an evil thing among you. Thus you shall not show pity: life for life, eye for eye, tooth for tooth, hand for hand, foot for foot."
— Deuteronomy 19:18-21 NASB
We see here that the idiom "an eye for an eye" is not to be taken literalistically, but rather figuratively. Manner for manner, or intention for intention. We also see that it is a reference to Law, because "judges" are specifically mentioned. The Law (government) are the ones who are to "investigate" and pass judgement. Right from the beginning we see that the intention of these verses completely rules out vigilantism. It should be noted however, that it is okay for us to defend ourselves. "Turning the other cheek" is in line with verbal assaults and people who have wronged you, it does not mean pacifism.
The sword mentioned in the following verse is a means of protection, and the sword is also used to symbolize capital punishment. Death. That means if you must kill someone while defending yourself or others, that is acceptable, even though the loss of life is not desired.
'And He said to them, “But now, whoever has a money belt is to take it along, likewise also a bag, and whoever has no sword is to sell his coat and buy one." '
— Luke 22:36 NASB
In the verse below, Jesus did not passively turn the other cheek, but rather, he called out the person that assaulted him.
'The high priest then questioned Jesus about His disciples, and about His teaching. Jesus answered him, “I have spoken openly to the world; I always taught in synagogues and in the temple, where all the Jews come together; and I spoke nothing in secret. Why do you question Me? Question those who have heard what I spoke to them; they know what I said.” When He had said this, one of the officers standing nearby struck Jesus, saying, “Is that the way You answer the high priest?” Jesus answered him, “If I have spoken wrongly, testify of the wrong; but if rightly, why do you strike Me?” '
— John 18:19-23 NASB
Below are three examples of "turning the other cheek." Notice that none of them involve threat to your life, but all involve wrongs that are done to you. Just as what was seen in John 18, it is okay to call someone out, but be kind to them regardless, because they will stand before God to give account of their own actions.
"But I say to you, do not resist an evil person; but whoever slaps you on your right cheek, turn the other to him also. If anyone wants to sue you and take your shirt, let him have your coat also. Whoever forces you to go one mile, go with him two."
— Matthew 5:39-41 NASB
The general principle however, is to peacefully get along with others as much as is possible. Peace…is not always possible.
"Never pay back evil for evil to anyone. Respect what is right in the sight of all men. If possible, so far as it depends on you, be at peace with all men. Never take your own revenge, beloved, but leave room for the wrath of God, for it is written, “Vengeance is Mine, I will repay,” says the Lord."
— Romans 12:17-19 NASB (reference to Deuteronomy 32:35)
As can be seen from the above passage, we are never to exact our own revenge. In this life, it is the government's place to exact such justice. It is also the case that in this life, some will go unpunished however, everyone in the history of mankind will at some point stand before the great throne of God. It is there that perfect justice will be served to all people.