Wikipedia defines n-gram like this:
In the fields of computational linguistics and probability, an n-gram is a contiguous sequence of n items from a given sample of text or speech. When the items are words, n-grams may also be called shingles.
An n-gram shows how often a word or phrase appears (e.g., in books, or in newspapers) over time. Google describes their NGRAM program as follows:
When you enter phrases into the Google Books Ngram Viewer, it displays a graph showing how [often] those phrases have occurred in a corpus of books (e.g., “British English”, “English Fiction”, “French”) over the selected years.
That’s where we get our data.