The Greeks voted a new government, comprising of the left wing Syriza coalition. The new government was against the austerity program imposed by other European leaders. They just called a referendum and go the support of the people in voting against the austerity program imposed by the lenders. The voting in the referendum was a surprise 61% vote in support of the government's stand.
The Greek government wanted the lenders to take a discount on the past loans that they had lent to Greece. A possible outcome is that the strong support from the referendum will strengthen the hand of the Greek government in negotiating a substantial discount with the creditors.
The alternative option is for Greece to exit the Euro currency, a situation that Europe and Greece wanted to avoid. I expect that both sides will reach a compromise on the last minute to avoid this outcome, and that both sides will agree on that discount.