The South Africa Act which created the Union of South Africa required that every member of parliament be "of European descent". When South Africa became a republic in 1961 the new constitution was even more explicit, requiring every MP to be "a white person".
A small number of qualified black voters in the Cape Province were able to vote for MPs - on the common voters roll until 1936 and then on a separate voters roll until 1959 when even this was eliminated. But they were not eligible for election.
In 1984 another new constitution created the so-called "Tricameral Parliament" which had three houses: one representing (and consisting of) white people, one for coloured people and one for Indian people. (The term "coloured" is complicated, but it refers essentially to people of mixed ancestry.) The black majority of the population continued to be unrepresented.
Black people were elected to the Legislative Assemblies of the various "homelands" - also known as "bantustans" - but these were of limited area and limited powers. In the 70s and 80s four of them became independent - unrecognized by any other country besides South Africa - and their assemblies were upgraded to parliaments.
If you're interested in the topic I would recommend By Due Process of Law: Racial Discrimination and the Right to Vote in South Africa 1855-1960 by Ian Loveland.