One of the earliest uses of the word "cocktail" in the way that we think of it now (as a mixed drink) was in the American periodical Balance and Columbian Repository in 1806. In response to a reader's question, the editor explained that a cocktail "is a stimulating liquor, composed of spirits of any kind, sugar, water and bitters." That's a definition that still works today. In fact, the editor just described a drink we would now call an old-fashioned, which could be considered the first cocktail.
Others argue that the first cocktail (or at least, the first one with a name) is the Sazerac, which was developed in New Orleans in 1838 by an apothecary named Antoine Peychaud. It originally consisted of a cognac called Sazerac, a sugar cube, bitters and a dash of absinthe. Nowadays, it's made with whiskey and the other ingredients. Sometimes a second type of bitters is substituted for the absinthe.