Conaider this situation:
Mark and Lisa are secretly a couple, and because of age difference they are not allowed to be together. Mark and Lisa meet every night when nobody is watching. They have estabilished their own set of rules how to comunicate when the time comes. He stands in her garden and throws the small rock at her window. Lisa knows that it is time, and responds by waving from the window and opening it afterwards so Mark can climb in. That was example how the API works.
The rock is initial request to another end. Another end waves, opens the window which basicaly means "Welcome in!".
API is almost like human language but for computers.