Scriptures such as the Manusmriti give us the causes of the loss of varna of a person. What are these causes?
There are many many actually. I am giving some of them. In general some minor sins known as upapAtakas result in jAtibhramsa or loss of caste.
11.59. Slaying kine, sacrificing for those who are unworthy to sacrifice, adultery, selling oneself, casting off one’s teacher, mother, father, or son, giving up the (daily) study of the Veda, and neglecting the (sacred domestic) fire,
11.60. Allowing one’s younger brother to marry first, marrying before one’s elder brother, giving a daughter to, or sacrificing for, (either brother),
11.61. Defiling a damsel, usury, breaking a vow, selling a tank, a garden, one’s wife, or child,
11.62. Living as a Vratya, casting off a relative, teaching (the Veda) for wages, learning (the Veda) from a paid teacher, and selling goods which one ought not to sell,
11.63. Superintending mines (or factories) of any sort, executing great mechanical works, injuring (living) plants, subsisting on (the earnings of) one’s wife, sorcery (by means of sacrifices), and working (magic by means of) roots, (and so forth),
11.64. Cutting down green trees for firewood, doing acts for one’s own advantage only, eating prohibited food,
11.65. Neglecting to kindle the sacred fires, theft, non-payment of (the three) debts, studying bad books, and practising (the arts of) dancing and singing,
11.66. Stealing grain, base metals, or cattle, intercourse with women who drink spirituous liquor, slaying women, Sudras, Vaisyas, or Kshatriyas, and atheism, (are all) minor offences, causing loss of caste (Upapataka)
11.67. Giving pain to a Brahmana (by a blow), smelling at things which ought not to be smelt at, or at spirituous liquor, cheating, and an unnatural offence with a man, are declared to cause the loss of caste (Gatibhramsa)
11.68. Killing a donkey, a horse, a camel, a deer, an elephant, a goat, a sheep, a fish, a snake, or a buffalo, must be known to degrade (the offender) to a mixed caste (Samkarikarana) and so on...
All these verses are from the Manu Smriti.
Adding some more verses:
Acceptance of gifts, giving instructions [in the Vedas] selling an article which should not be sold, and officiating as a priest at a sacrifice the doing of these four, [is described] in the Smritis as outcasting the Kshatriya and the Vaisya. (20)
[By selling] meat, shell-lac and salt, [a Brahmana] becomes immediately outcasted. By selling milk, a Brahmana becomes a S'udra within three days.
Atri Smriti, Chapter 1.
For the Sudra i found the following relevant verse from ParAshara Smriti:
66.By selling Wine and meat,by consuming prohibited foods, cohabiting with prostitutes a shoodra falls from his caste. (Parashara Smriti)
And, the Manu Smriti also prescribes atonement measures for removing sins leading to loss of caste as follows. Needless to say only Dvijas can perform these remedies.
Manu Smriti 11.258. Or if, pure (in mind and in body), he thrice repeats the Samhita of the Veda in a forest, sanctified by three Paraka (penances), he is freed from all crimes causing loss of caste (pataka).
Manu Smriti 11.259. But if (a man) fasts during three days, bathing thrice a day, and muttering (in the water the hymn seen by) Aghamarshana, he is (likewise) freed from all sins causing loss of caste.