Tell me about apartheid

I’m interested in the way the apartheid system in South Africa used to work. OK, in general I know it meant segregation of the races and massive disrcimination of the black majority while power was entirely in the hands of the whites, but what did it look like in detail?

Were blacks completely (i.e., even formally) denied citizenship (AFAIK the South African government declared a few areas [“bantustans”?] formally independent nations to avoid being responsible for them), or did they technically have suffrage and all that and were practically deprived of it via poll taxes, literacy tests etc. as it used to be in the southern US? Was SA a democracy, anyway, with free press and the government being subject to elections by the people (if only the whites among the people), or was it a dictatorship where public opinion didn’t matter?
What was the general justification SA presented to the rest of the world? And how did the system collapse - was there some white reformer renouncing it, or did the blacks have to fight for their rights?