Through the API you are able to call functions from a web service.
An API is an interface implemented by a software program that enables it to interact with other software. Consider it similar to the way the user interface facilitates interaction between humans and computers.
On the web an API is largely implemented by libraries to determine vocabularies and calling conventions, and is used to access services. In object oriented languages, an API usually includes a description of a set of class definitions, with a set of behaviors associated with those classes. A behavior is the set of rules for how an object, derived from that class, will act in a given circumstance. The API prescribes the methods by which one interacts with/handles the objects derived from the class definitions or interface.
"The Google Maps Javascript API lets you embed Google Maps in your own web pages. Version 3 of this API is especially designed to be faster and more applicable to mobile devices, as well as traditional desktop browser applications." - Google
Get Key Access
Get Started with Google Maps to gain access to the API by having a key generated.
Use JavaScript to interface with the API:Google Maps JavaScript Tutorial
Geocoding "Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map. The Google Maps API provides a geocoder class for geocoding addresses dynamically from user input." - Google -
Use of API for Geocoding: JavaScript Geocoding Documentation
Although basic Google Maps (embedding a map with a marker) use remains free, use of directions, street view, search mode and using the JavaScript API is no longer free. Maps Billing
OpenStreetMap is "a map of the world, created by people like you and free to use under an open license."
Leaflet is "an open-source JavaScript library for mobile friendly interactive maps."