Go straight to the horse's mouth for information on South African visa requirements, namely the Department of Home Affairs which has a comprehensive website. This website details which nationals are exempt from visas, and which are obliged to make application. Enquiries regarding South African visa info can also be obtained from South African missions in your country, or the nearest one to you.
If you are a national of a country that requires visas, you must make application ahead of your departure, as visas are not issued on arrival. The visa must be affixed in your passport to be shown to immigration officials on landing. Applications must be made through South African diplomatic or consular representatives.
You will have to supply a number of elements in terms of visa requirements in South Africa, such as:
A passport valid for no less than 30 days after the expiry of the intended visit, and at least 1 unused page for entry/departure endorsements (sometimes referred to as the visa page).
Payment of a prescribed fee.
A vaccination certificate, if required (travel through the yellow fever belts of Africa and South America requires inoculation)
Statement and/or documentation confirming the purpose and duration of your visit.
Two identity photographs (guidelines on website).
Proof of financial means in the form of bank statements; salary advices; undertakings by your hosts in South Africa; bursaries; medical cover; or cash available, including credit cards or travellers' cheques.
If travelling by air, a return or onward ticket; or proof of sufficient funds; or lodge a cash deposit of equivalent value to such a ticket.
Take care to request the correct duration of stay and type of visa. Also check on processing time so that you don't have any last minute panic.