Background
The salt of the earth parable is one of the earliest taught by Jesus. He liked it so much that he gave it on three separate occasions!
The first time he gave this parable was during his Sermon on the Mount which was preached likely in the summer or fall of 27 A.D. (Matthew 5:13). The second time was in Mid-November of 29 A.D. as part of the Lord's correction of the disciples arguing amongst themselves as to who would be the greatest in God's kingdom (Mark 9:50). The third and last time it was taught was from January to February 30 A.D. (Luke 14:34 - 35).
The Parable
The salt of the earth parable varies only slightly each time it is recorded in the Bible.
You are the salt of the earth; but if the salt has become tasteless, with what shall it be salted? For it no longer has any strength, but is to be thrown out and to be trampled upon by men (Matthew 5:13).
"The salt is good, but if the salt becomes tasteless, how will you season it? Have salt in yourselves, and be at peace with one another." (Mark 9:50).
"Salt is good; but if the salt becomes tasteless, with what shall it be seasoned? It is fit neither for the land, nor for the manure; but they cast it out. The one who has ears to hear, let him hear." (Luke 14:34 - 35).
We can discover the meaning of being the salt of the earth by briefly looking at the parable that follows it. Jesus, in Matthew 5:14, calls on believers to be the light of the world. The "light" here stands for their humble works of service and love they are to do as an example to others.
By publicly doing good works Christians advertise the goodness of God to others such that the Father is glorified in the process (Matthew 5:16).
Being the salt of the earth means making a concerted effort to make a noticeable difference in the world. Just like the condiment, when added to food, is not only noticed but also enhances its flavor, good works done by Christians make life in an otherwise carnal world more palatable.
Losing Flavor
Jesus warned that like salt losing its flavor that Christians can lose theirs. What exactly did he mean?
. . . but if the salt has become tasteless, with what shall it be salted? For it no longer has any strength, but is to be thrown out and to be trampled upon by men (Matthew 5:13, HBFV).
Houses, in the first century A.D., were often built (or had added to them) with upper rooms where guests could stay for the night or which could be used for special occasions. These rooms usually had floors composed of wood that had a special plaster mix laid over them.
Ordinary plaster used for building structures like walls was too soft for floors since it was prone to peeling and cracking. Adding salt to plaster made it hard enough to withstand the wear and tear experienced by a floor. Doing so, however, made the mineral impure and no longer able to fulfill its primary role as a seasoning agent. They only thing it was good for was to be trampled (walked on) by people.
Full Meaning
Christians, as is symbolized in the salt of the earth parable, need to live a holy life full of good works that make a difference in the world. These actions will help them keep their "flavor" and continue to be useful to God.
Believers, however, can lose their "saltiness" by not doing good works, or by taking the gifts they have and using them for selfish purposes, or by indulging in sin and false doctrines. Such actions will cause them to lose their purity and ultimately lead to them becoming useless and vain (see Mark 7:7 - 9).