The Eighth Commandment is: Thou shalt not bear false witness against thy neighbor. As the Seventh Commandment guards our neighbor's property, the Eighth Commandment guards his character. Sins against it are lies, calumny, detraction, tale-bearing and rash judgment. To tell a lie is always sinful. A lie is a mortal sin (a) If it is a lie told on a oath; which is perjury. (b) A lie told in confession to conceal a mortal sin; which is sacrilege.
(c) A lie about our neighbor which does him serious injury; this is calumny. Detraction consists generally in uncharitable talk by which we may do our neighbor serious injury, making known his secret faults or actions; this is not permitted unless we have a justifying reason for doing it. Such a justifying reason could be to warn a friend against the danger of the company of an evil companion.

If in any of these ways mentioned above we deliberately do serious injury to our neighbor without a justifying cause, even though we may be telling the truth we are guilty of serious sin. If the injury were not serious we would be guilty of venial sin. Again as with the Seventh Commandment, we are bound as far as it lies in our power to restore what we have taken away from our neighbor before we can be forgiven. In this case it is his character which is often esteemed of more value than worldly  possessions. Rash judgment is coming to an uncharitable conclusion about something that concerns our neighbor, on insufficient evidence. For example, to conclude that a man is a drunkard because he has a red nose. He may have only a cold in the head.

Source:  Rev. W. Frean. Commentary on the Catechism.

The Lord has forbidden anyone to injure his neighbor by deed. In this Commandment he forbids us to injure him by word.
In ordinary conversation, we can violate this Commandment: By gossiping, by repeating whatever they hear, gossipers break this precept; "Six things there are which the Lord hateth, and the seventh His soul detesteth:...him that soweth discord among brethren. (Prov. 6:16-19.) By flattery, by speaking honeyed words, flatterers bear false witness: "The sinner is praised (by flatterers) in the desires of his soul, and the unjust man is blessed. (Ps. 10:3.) And again: "O my people, they that call thee blessed, the same shall deceive thee." (Isa. 3;12.)

Reasons lying is forbidden
Lying likens a person to the Devil,
because a liar is as the son of the devil. Now we know that a man's speech reveals the region and country of his origin. Thus: "Even thy speech doth discover thee." (Matt. 26:73.) In the same way, some men are of the devil's kind; and because they are liars, they are called sons of the devil, since the devil is "a liar and the father of lies." (John 8:44.) Thus the devil lied when he said, "No you shall not die the death." (Gen. 3:4.) In contrast, some other men are the children of God, Who is Truth. These are the men who speak the truth.

Lying destroys the liar's reputation for the truth. He who is accustomed to telling lies is not believed, even when he speaks the truth. Lying also kills the liar's soul, for "the mouth that belieth killeth the soul." (Wisd.of Sol. 1:11.)

Reasons people lie.
There are some who lie for their own advantage, and this is in a variety of ways. Because of shame, people sometimes lie, such as when someone tells a falsehood believing that he is telling the truth and then, on becoming aware of it, he is ashamed to retract the falsehood. For desired results, people sometimes lie, such as when they wish to gain or avoid something. To benefit another, people sometimes lie, such as when they wish to free someone from death, danger, or some other loss. This must be avoided, as St. Augustine tells us: "Accept no person against thy own person, nor against thy soul a lie. (Ecclus. 4:26.) Out of vanity, people sometimes lie.  This too, must never be done, lest the habit of such lead us to mortal sin.

Source:  Saint Thomas Aquinas, God's Greatest Gifts.