A flip is a class of mixed drinks.  According to the Oxford English Dictionary, the term was first used in 1695 to describe a mixture of beer, rum, and sugar, heated with a red-hot iron ("Thus we live at sea; eat biscuit, and drink flip").  The iron caused the drink to froth, and this frothing (or "flipping") engendered the name.  Over time, eggs were added and the proportion of sugar increased, the beer was eliminated, and the drink ceased to be served hot. 

The first bar guide to feature a flip was Jerry Thomas's 1862 How to Mix Drinks; or, The Bon-Vivant's Companion.  In this work, Thomas declares that, "The essential in flips of all sorts is to produce the smoothness by repeated pouring back and forward between two vessels and beating up the eggs well in the first instance the sweetening and spices according to taste."

With time, the distinction between egg nog (a spirit, egg, cream, sugar, and spice) and a flip (a spirit, egg, sugar, spice, but no cream) was gradually codified in U.S. bar guides.  In recent decades, bar guides have begun to indicate the presence of cream in a flip as optional.

History

The hot beverage known as flip, from which the modern cocktail evolved, has been around since the late 1600s originating first from colonial America and defined as "a sort of Sailors Drink." It was a very popular drink in both English and American taverns until the 19th century. There were many variations as each tavern would have its own recipe. It was principally a mulled ale, with the addition of rum or brandy, sugar, spices (almost always grated nutmeg), and fresh eggs. Some notable variations existed such as the Sailor's Flip which had no ale, or the Egg-Hot which had no spirits.

The drink was warmed (and thus mulled) by first having its beer component placed in a vessel by a fire. Once near boiling, the hot ale was transferred to a jug and combined with the eggs and other ingredients. Another jug was used to pour the liquid back and forth (hence the name flip) until creamy smooth. Finally, the drink was served in a cup or tankard and finished using a dedicated iron fireplace poker called a flipdog, hottle, or toddy rod. The rod would be heated in or by the fire until red-hot and then plunged into the cup of flip. The hot iron further mulled and frothed the drink, imparting a slightly bitter, burned taste.

A loggerhead was originally used as the hot-rod before the purpose-built flipdog or toddy rod evolved from it. It was a narrow piece of iron about three feet long with a slightly bulbous head about the size of a small onion, used for heating tar or pitch to make it pliable.

Flip is mentioned in Charles Dickens's 1864 book Our Mutual Friend when describing the Six Jolly Fellowship Porters tavern.

The drink is central to an annual winter woodchopping event in Harriet Beecher-Stowe's 1869 comedy Oldtown Folks, which seeks to illustrate New England culture (specifically Massachusetts) circa 1820. A minor lumberjack character, 'old Heber Atwood,' sips from a mug of flip, and the Deacon sips from a tumbler. The flip is served to all of the townspeople, alongside cake and cheese.

A recipe of the old drink, as written in The Cook's Oracle (1822):
To make a quart of Flip:— Put the Ale on the fire to warm, — and beat up three or four Eggs with four ounces of moist Sugar, a teaspoonful of grated Nutmeg or Ginger, and a quartern of good old Rum or Brandy.

When the Ale is near to boil, put it into one pitcher, and the Rum and Eggs, &c. into another;— turn it from one pitcher to another till it is as smooth as Cream.The first account of a cold flip was in 1874 with E.A. Simmons's book The American Bar-Tender; or The Art and Mystery of Mixing Drinks followed thereafter by Jerry Thomas's guide in 1887.

Flip recipes from Jerry Thomas (1887)
The following flip recipes appear in Jerry Thomas 1887.

 Cold Brandy Flip – brandy, water, egg, sugar, grated nutmeg
 Cold Rum Flip – substitute Jamaica rum
 Cold Gin Flip – substitute Holland gin
 Cold Whiskey Flip – substitute Bourbon or rye whiskey
 Port Wine Flip – substitute port wine
 Sherry Wine Flip – substitute sherry
 Hot Brandy Flip – brandy, sugar, egg yolk, hot water, grated nutmeg
 Hot Rum Flip – substitute Jamaica rum
 Hot Whiskey Flip – substitute whiskey
 Hot Gin Flip – substitute Holland gin
 Hot English Rum Flip – ale, aged rum, raw eggs, sugar, grated nutmeg or ginger
 Hot English Ale Flip – same as Rum Flip, without rum and less egg white
 Sleeper – aged rum, sugar, egg, water, cloves, coriander, lemon

References

Mixed drinks
Cocktails with whisky
Cocktails with rum
Cocktails with brandy
Cocktails with eggs
Cocktails with gin