Greek debt has been spiraling outwards since the financial crash in 2008, but there has been severe resistance to “austerity measures” (another way of saying spending cuts, usually targeting social programs like retirement pensions) that would be necessary to balance their budget and get on good terms with their creditors (particularly France and Germany). The referrendum on July 5th was engineered by the current Prime Minister, Alexis Tsipras, who was elected on the promise to fight these measures and prevent drastic cuts to social spending.
However, by avoiding these cuts, it meant that Greece would be unable to pay its bills to other countries and the International Monetary Fund. This was a big risk; it could mean that Greece would be unable to continue to use the Euro as their currency, and could even be removed from the European Free Trade Zone, if the European Union decided the violations were serious enough.
These threats were so strong that Tsipras, despite all rhetoric, did agree to creditor demands last week, and Greece will enact the austerity reforms necessary to continue to use the Euro. This is far from the end of Greece’s financial and economic problems, but it does keep the door open for more European investment, loans, and support.