Relevant text (KJV Deuteronomy 15:1-2)
At the end of every seven years thou shalt make a release. And this is the manner of the release: Every creditor that lendeth ought unto his neighbour shall release it; he shall not exact it of his neighbour, or of his brother; because it is called the Lord's release.
It was a fairly common practice in the Middle East for a king to proclaim the forgiveness of debts (and release of debt-slaves) on his ascension to the crown, and sometimes also at other points during his reign; the Hebrews took that one step further by making it regular. This was felt to be necessary because most debt, at the time, was "consumer" debt, and at very high interest rates - comparable to modern credit cards, but enough grain to tide you over the winter would be a much higher percentage of your earning capacity for the next year than maxing out a credit card is today. (Obviously, lenders then charged even more interest to compensate for the risk of having the loan annulled.) So it was easy to get into a debt trap, and harder to get out of than it is now - not that it's that easy today, but back then it would be nigh impossible. And since anyone's harvest could fail, if the consumer debts weren't forgiven every so often, you'd end up with a mass of debt-slaves and a few huge landowners who were lucky and diversified enough that they'd never had to take a loan. Which would be bad for the kings, whose most powerful subjects were quite overmighty enough already, thanks.
Source: David Graeber, "Debt".
In the Old Testament, the number seven is a significant number because, in Genesis, it was the day that God had finished creating the world and was at rest [aka released from work]. Following from that, there are several traditions based upon the number seven and the concept of release and atonement.
Every seventh year was deemed a Sabbatical year where all debts incurred by members of the community were mandated to be released. Caveat - this did not extend to those who were deemed outside of said community, so these people would still have to honour their debts.
However, every 49th year [the seventh Sabbatical year] was the Year of Jubilee, where all debts were released. This included people who were not members of the community and anyone held under a debt bondage.
Edit: just remembered the second part of your question. It is believed to have been practiced for a time, until the Assyrian capture of Israel.
Note about the Sabbatical Year:
Observant Jews still practice the Sabbatical year, known as "shmita". We are currently in a shmita year (Year 5775 according to the Jewish calendar).
There are several laws that are still binding to observant Jews even today. The most important of these involve Jews forgiving personal debts to one another and not being allowed to eat agricultural produce grown by Jews in Israel. This involves some complicated finagling for Israeli Jews and means that observant non-Israeli Jews need to be careful about eating produce that might have been imported from Israel.
You can learn more about the shmita year in Maimonides's Mishneh Torah