SOAP API: It has been preferred for services within the enterprise and it involves downloading a WSDL file, Converting the WSDL files to regular classes and then invoking methods on those objects.
REST API: It has been preferred for services that are exposed as public APIs. You access rest API in the form of URL.