Courts in South Africa and their functions