How can one automate trading strategies using APIs?

How can APIs be used to automate and manage algorithmic trading strategies?,