Ansible uses both SSH and API to manage and configure remote systems. SSH is used for initial setup and configuration, while API is used for ongoing management and configuration tasks.