A number of other SADC (South African Development Community) passport holders, as well as most South American nationals, can enter South Africa and stay for up to 30 days without a visa. Again, passports will be stamped with the 30 days on arrival in South Africa.
The full list of countries whose passport holders are allowed into South Africa either for 90 days or 30 days without a visa can be found here.
If you cannot find your country on any of these lists then you will need to apply for a visa at least 4 weeks before travelling to South Africa. This can be done at your nearest South African Department of Home Affairs. Visas will not be issued at ports of entry in South Africa.