What are sanctions?
Economic Sanctions is a method of pressure against the government of another country:
Economic sanctions are commercial and financial penalties applied by one or more countries against a targeted self-governing state, group, or individual. Economic sanctions are not necessarily imposed because of economic circumstances—they may also be imposed for a variety of political, military, and social issues. Economic sanctions can be used for achieving domestic and international purposes
So in short, it is an agreement between a group of countries saying that they won't do business with the target country unless it will do (or stop doing) something, for example, stop persecuting minorities, adhere to international law etc. In effect, the targeted country cannot earn money from exporting its own goods and cannot import goods that it doesn't produce, which cripples its economy.
In the case of South Africa, the reason behind the sanction was the policy of Apartheid - a system of institutionalized racial segregation within that country and repeated breaches against human rights.
What were the sanctions against South Africa
South Africa was sanctioned many times with limited success - you can find the comprehensive list here. The ones mentioned in The Crown are most likely those ones:
August 4, 1986: Seven members of the Commonwealth group of nations meet in London. Six
of the seven agree to restrict their imports of South African agricultural goods,
uranium, coal, and iron and steel. The United Kingdom was the nation that
did not agree to these sanctions
Why Thatcher didn't agree to those sanctions?
There were two main reasons for that:
Maggie was really trying to Make Britain Great Again 1 This means she was refusing to do anything that would hurt the economy of the United Kingdom: if you refuse to buy and sell goods to the sanctioned country, you will be losing money too. And since the economy of the UK was already fragile, she didn't want to do anything that would risk it(especially when you notice that the proposed ban was affecting such critical goods as uranium or platinum) in the name of such notions as Human Rights 2. It is also worth to point, that her son was personally doing business within South Africa, so the effects of her sanctions could hit quite close to home.
The second reason is a bit more complicated and sensitive: In 1980s Great Britain was involved in undeclared war in Northern Ireland: broadly speaking, the Protestants wanted to remain as a part of the UK, while the Catholics wanted to unite Ireland. To pressure the government, IRA has performed a bombing campaign against economical and political targets (including Thatcher herself). The same was doing the ANC - the organization fighting for the rights of the black majority within South Africa. Thatcher was condemning both IRA and ANC3
, going as far as calling Nelson Mandela "a terrorist", which means that she somehow had to agree with the methods used by the Apartheid government.
Tl;dr
The sanctions were severely restricting trade with South Africa. Margaret Thatcher didn't want to agree to them, because they would hurt the UK and she had a degree of sympathy towards the South African government
1 - This is not a parody of Trump's "MAGA" - Margaret Thatcher has used those exact words as early as 1950.
2 - However you want to remember Thatcher, she has done some questionable things, especially towards the poorer part of the population. Friendly visits with Augusto Pinochet (who was at that time under arrest accused of breaking human rights) suggest that this wasn't as high on her list as economy
3 - The fact that ANC was sympathizing with Soviet Union didn't help either. Remember, that this is still Cold War period!