An API is generally an interface that a program, utility or library allows a programmer to use to interact with it and its functions.
They are a common aspect to all modern languages, allowing functionality to be extended by installing new apps/libraries or utilities and the API's which access them.
These can do anything from drawing windows on a screen (like Qt and Gtk), controlling an RCX, playing music, handling keyboard input or putting data out onto the web.
Generally, the more popular an API is, the easier it is to find documentation and examples on the internet. Some of the best Open Source API's are brilliant examples of this, which may have whole communities spring up around them, full Doxygen or Javadoc style navigable documentation and mailing lists, as are the documented sections of the Microsoft API's which MSDN covers fairly well.
Other proprietary Vendor API's can tend to be hard to find documentation for without shelling out for a book. There are a number of these where, while the license for the API is not cheap, the books covering it are even more expensive.
Generally for most of the API's though, like most programming languages and technologies, there are also a wealth of books for them. Amazon tends to be a good place to start, and O'Reilly books are recognised as being among the best references.
On a final note, many languages or platforms come with their own API, which can be one of the things to learn along with its syntax and quirks. The Nutshell guides can be very, very handy for this, as can a quick bit of googling.
Time to build your own robot! Using a Raspberry Pi with parts and some time, you can use my book to learn how to make and program a robot with automatic behaviours.