The deal is an agreement between Iran and other major world powers - the US (although it is now withdrawing), UK, France, China, Russia and Germany.
It restricts what Iran is allowed to do with its nuclear programme, which makes it possible for the country to develop a nuclear weapon.
But in return for Iran doing this, major world powers lifted restrictions they had placed on Iran, which were crippling the country and making the cost of living really expensive for ordinary people.
Even without the restrictions placed on the country, life in Iran has remained difficult for many people and there has been a lot of tension.
In January, thousands of people took to the streets in the Middle Eastern country of Iran to protest against the country's government. They were the largest anti-government protests to have taken place in the country since 2009.
The unrest started on Thursday, 28 December 2017 in the north-eastern city of Mashhad - Iran's second biggest city. Within a day, the protests had spread across the country.
On 3 January, the head of Iran's security service the Revolutionary Guards declared the protests had been defeated.
In order to understand why there has been unrest in Iran, it is necessary to understand a bit about the country's background and recent events that have led to the current situation.
Iran is ruled in a different way to many other countries.
It has what is called a theocratic government. Theocratic means a system of government in which religious leaders rule in the name of a god.
Iran is an Islamic republic ruled by religious leaders, who govern according to the laws of Islam.
This has been the case since 1979, when the country's monarchy was overthrown in the Islamic Revolution.
This meant Iran would no longer have a King (known as a Shah), but a Supreme Leader instead, who would be the most powerful person in the country.
In 1979, Ayatollah Khomeini became the Supreme Leader of Iran.
The Supreme Leader has the most power over how the country is run. He is chosen by a group called the Assembly of Experts.
He has control of the armed forces, as well as the security and intelligence services. He chooses the people in charge of the courts, the media, and also six of the 12 members of the Council of Guardians, which is an important group which oversees the Iranian Parliament.
Iran also has a president - the second most powerful person in Iran - who is voted for by the people.
When Khomeini died 10 years later, the president at the time - a man called Ayatollah Ali Khamenei - was appointed as the new Supreme Leader of Iran. He remains the Supreme Leader to this day, as it is a job that you get for life.
The current president of the country is Hassan Rouhani, who came to power in 2013.
Since becoming president, Rouhani has aimed to build a better economy in Iran and improve its relations with the rest of the world. This earned him a lot of support from the Iranian people and he was re-elected in May 2017.
But the situation has not been entirely peaceful ever since the 1979 revolution.
In 2005, a man called Mahmoud Ahmadinejad was elected president of Iran. In 2009, he was re-elected, but many people disagreed with the result and said that the election was not run fairly.
An uprising called the Green Movement brought together millions of Iranians who all demanded that the election was re-run. It brought together the biggest crowds since the 1979 Islamic Revolution and caused a lot of unrest.
Despite the protests, Khamenei (the Supreme Leader) insisted the result was valid and Ahmadinejad was sworn in for a second term as president in August of that year.
It wasn't until the 2013 election that Iran got a new president - Hassan Rouhani. He won over half of the votes and many people hoped that this would bring about the change that the country needed.
One important event during Rouhani's presidency happened in 2015, when he made an important deal with other major world powers known as the Iran nuclear deal.
At the time, Iran did not have a very good relationship with these other countries because they thought that Iran was working to build a nuclear weapon - even though Iran said its nuclear activities were peaceful.
As a result, the UN, US and several other countries imposed special restrictions on Iran called sanctions, which were designed to damage its economy and put pressure on the country to stop what it was doing with its nuclear programme.
For example, Iran was stopped from selling oil and natural gas to certain countries, which was a big deal because the country made a lot of money from doing this.
Iran lost around £110 billion in money that it could have made from selling oil between 2012 and 2016 alone.
This really damaged the country's economy, making the cost of food and fuel really expensive for ordinary people.
When President Rouhani came to power, one of his main promises was to deal with the damage that these sanctions were doing.
After many years of on-off talks, in 2015 President Rouhani agreed a deal with six major world powers (the US, UK, France, China, Russia and Germany) which saw the sanctions lifted in return for Iran cutting back its nuclear activities.
It was hoped that this would help Iran to rebuild and get the country back on its feet again.
What is the current situation?
Despite this, President Rouhani hasn't delivered what the people of Iran had hoped he would.
The situation for ordinary people living in Iran has not got much better.
Protests broke out earlier this year because people remain frustrated about this. Food prices are still high, the standard of living is low and many people don't have jobs.
They are also unhappy because many think their leaders are not running the country in an honest way.
Since the protests first started, the reasons that people were angry developed into something much bigger. Many started chanting against the government, calling for their Supreme Leader to go.
People also remain angry about Iran getting involved in fighting in other Middle Eastern countries, like Syria, because this costs a lot of money, which they say they need in their own country.
President Rouhani said at the time that citizens are "completely free to make criticism and even protests", but some people criticised this as they say that in the past Iran has tried to stop people from protesting.
Rouhani added that the government would not tolerate any action that caused "social disorder", the Iranian Students News Agency reported.
The protests led to violence in which some people were killed.
Why were the recent protests so significant?
The protests at the start of this year were the most significant unrest the country has experienced since 2009, but there were differences this time.
Firstly, the protests in 2009 were more focused on the country's capital city, Tehran. This time, they spread out across the country, with lots of protests taking place in smaller, poorer areas of the country - not just the capital.
Secondly, there weren't clear leaders in a more organised movement, like the Green Movement. There were lots of different groups who were unhappy and many protestors appeared to be poor, unemployed people all over the country.
In 2009, it was also clearer from the beginning of the unrest what the protestors were unhappy about and what they wanted. This time, the protests developed into something much bigger than what they were when they first started.
What was the response to them?
The US, Israel and Saudi Arabia all spoke out supporting the protestors.
On social media, President Donald Trump shared his respect for those protesting and criticised the Iranian government. At the time, he had also been making it clear he was opposed to nuclear deal, from which he has just pulled out.
The Iranian government responded by saying he should focus on what's going on in his own country.
The EU called on Iran to guarantee people's right to protest peacefully and said it was monitoring the situation.
It is hard to know what will happen next for ordinary people living in Iran and whether or not they can be made happy with how it is being run and who is in charge, but it remains a big challenge for the country's rulers.