The most accurate response that explains how the system of apartheid in South Africa ended is:
Activists used nonviolent and violent protests to bring attention to apartheid and put pressure on the government for decades, until the government dismantled the policies.
This answer recognizes the comprehensive efforts of activists over many years, highlighting both nonviolent and violent methods in the struggle against apartheid.