Why you need Google API key ?
Google provides API to access their services. In order to use a Google service in your website, you need a API Key.
Google API Console: https://code.google.com/apis/console
List of service provided by Google?
Google Maps , Google Places, Google analytics, Google Drive, Google Books, Google + API, PageSpeed API, Youtube API, ULR Shortenter API, Google Cloud API, Google Android maps API, ..etc
Types of Google API Keys:
a). Browser apps API key
Browser key is used for services like Maps, where the API is used in user browser.
b). Server apps API Key:
Server key is required for apps, where you use google API server-side.
Example: Services with PHP/Java/.NET (URL Shortener , Youtube Data API )
c). Authorized API key ( OAuth)
OAuth key is required, where the user authorization is required to access the service using the API.
Example: When you are making application to read mails from Gmail / To store files in Google Drive.
d). Android API Key
Android key is required for android applications only.
Example: Google maps for android, Google Cloud Messaging.
Why you need to create a project ?
In order to create a API key, first you need to create a Project. A project can have multiple services and multiple API keys.
i.e: With the same API key, you can access multiple services provided by Google.
How to get Google API Key ?
Step1: Go to Google API Console: https://code.google.com/apis/console
Step 2: Create API Project
Step 3: Register Project ID ( Go to Project => Overview Tab)
Step 4: Select Services you want to use ( Go to Project => Services Tab )
For Browser apps API Key : By default, one browser key is created when you select some services. Otherwise (Go to Project => API Access Tab => Create new Browser Key button)
For Server apps API Key : Go to Project => API Access Tab => Create new Server key
For Android apps API Key : Go to Project => API Access Tab => Create new Android key
For OAuth API Key : Go to Project => API Access Tab => Create an OAuth 2.0 Client ID
Check the below video.