I’ve read that excommunication was threatened for all sorts of misdeeds and violations of religious law. For example I read the Third Lateran Council in 1179 threatened excommunication for any Christian who lended money at interest. How often were things like this actually enforced? And if you actually did get excommunicated, what would happen to you? Obviously the consequences of excommunication would be different for like Henry VIII vs. some random merchant or whoever.
Well, of course there was no religious morality police in the Middle Ages, so whether you would be brought into an ecclesiastical court for a violation of canon law (the laws laid down at church councils which were codified by papal jurists from the 12th century on) ultimately depended on your standing with your local priest/ bishop and the local community. If a Christian merchant was a usurer but was otherwise an upright, pious and valued member of the community, no one would mind too much, but if he was a very anti-social figure they would despise him. For example, a surviving agreement from 1260 details how four Italian merchant bankers set up a pawnshop in the village of Poigny in the Champagne region of France. In this agreement there were provisions detailing how none of them were to sleep with female domestic servants or bring in women for carnal purposes, and since these women would be the wives, sisters and daughters of local men this indicates that not only did they not want the additional moral stigma of fornication but they also did not want to be seen as anti-social figures - adultery is obviously very anti-social, and any sex outside marriage could be regarded as damaging to a woman's honour, whether or not it was consensual or rape. Meanwhile, to give a different example, a wealthy early 14th century English villein called John Thedrich, though he undoubtedly contributed quite a lot to the local economy by employing his neighbours as wage labourers on his farm, was a bit of a violent bastard who got into trouble a lot for getting into fights, for which he had to pay fines at the manorial court. He was also amerced for usury too, since he would have undoubtedly been unpopular with his neighbours who would have really wanted to get him into trouble with the ecclesiastical courts. Alternatively, a usurer could avoid penalties by engaging in pious and charitable good works to redeem his soul and win favour with the church and the local community, the former being exemplified by the famous Scrovegni chapel in Padua (built sometime around 1300 for Enrico Scrovegni, a usurer, which he dedicated to the religious fraternity of the cavalieri gaudenti - literally meaning the "jolly knights") and the latter being exemplified by the Fuggerei, a social housing complex in Augsburg (still in use today) built in the 1520s by Jakob Fugger, the banker to the Hapsburg Emperor Maximilian I.
As for what an excommunication would entail. For a peasant, merchant or knight it would simply mean being isolated from your parish community and having your soul in jeopardy until you renounced your heretical doctrines/ performed public penance before the cleric who excommunicated you. As for kings and emperors, excommunication might lead to much worse. For example, Holy Roman Emperor Frederick II and his sons were excommunicated by Pope Innocent IV, who, after Frederick's death, then invited Charles of Anjou, the younger brother of Louis IX of France, to go on crusade against Frederick's illegitimate son Mannfred, the ruler of Frederick's kingdom of Sicily, in return for Charles being able to claim it for his own. To give an earlier example, the excommunication of Holy Roman Emperor Henry IV was initially reversed in 1077 when he performed a tactical penance by standing outside in the snow in a hair shirt for a few days before Pope Gregory VII at Canossa castle in Italy, but then when the Pope refused to agree to Henry's demand to allow him to appoint German bishops again, Henry had to appoint an anti-pope (Clement III) and invade Rome in 1084.