API is just an acronym which stands for Application Program Interface. All that means is that an application is exposing its functionality in a way that's easy for your application to interact with.
For example, Google Maps' API documentations can be found here and although it's a bit more complex than what we've done so far, it offers certain endpoints for our application to use in a programmatic fashion. There are plenty of guides or tutorials online to show you how to implement Google Maps' API in your application, so we're not going to spend time on it, but you get the point -- an API means offering a way for an application to interact with another application in a programmatically convenient manner.
Another API that's not a web-based one, is the API we've been using this whole time -- the browser's API! Yes my friend, all of those built in functions? Well some of them are original to ECMAScript specification (read: JS) itself, but stuff such as
XMLHttpRequest, that we've already discussed, is part of the browser's API, which is just an interface for our application to interact with the browser's built-in functionality (in the case of
XMLHttpRequest -- its ability to make requests over the Internet).
APIs could also have nothing to do with web applications. For example the Apple iPhone and its OS (Operating System), iOS, have their own API, which is not used over the net, but rather is consumed via built in methods the developer can use (for example: to interact with the device's geolocation and other functionality) much like the browser's API we've mentioned before.
Most likely most of the stuff you need to create your application is already available in an API of some sort. To find APIs for maps, social applications, videos, music, etc. etc. use Google. You can also search for them here.