Mandela spent most of that time in prison on Robben Island, near Cape Town, where he and other prisoners did forced labor in a quarry.
Nelson Mandela spent long 27 years in prison as a political prisoner. Most of that time he spent in prison on Robben Island, near Cape Town, where he and other prisoners did forced labor in a quarry. He usefully utilized the time spent in prison to graduate law at London University via correspondence.
Mandela was sentenced to lifelong imprisonment, but when South Africa got the new president Frederick Willem de Klerk, he was released from prison. Upon his release, his wife Winnie Mandela followed him. He gave a speech from the balcony of the City Hall in Cape Town, acknowledging that the new President de Clerk is a man with integrity. However, he noted that the fight against apartheid was not yet over and that he and his colleagues will continue the struggle.