There are a number of different arguments amongst historians as to when the game of poker came about; some believe that it was invented initially within the United States, while other believe that it was adapted off of European games, primarily a card game that had been developed in France. It is not exactly clear as to which of these theories is true or whether even one of them has to be true, but for the most part what we can say for certain is that poker was most likely invented within the space of the late 17th century, from 1650 to 1700.
When the game was initially traced with certainty in the United States, it was found to be present in New Orleans in 1829 and at that point was played with a deck of 20 cards and many of the contemporary hands such as flushes and straights not at all playing a part in it. This earlier variant of poker spread up the Mississippi river through the different riverboat gambling services and as they became more popular, the game did eventually find itself at least somewhat into the different areas of the country.
It is quite interesting that The Civil War played prominently in the eventual rise of the first of the poker variants still played today, but that is definitely the case. The first 52-card deck of poker was created shortly before the start of The Civil War and during the war itself hands like flushes and straights were introduced and the two original poker games, five card draw and five card stud, were invented. From then on, the game practically flourished in the United States alone, with all of the successive variants such as community card games and further variations of stud and draw as well as low-hand games were created.
As the 19th century became the 20th century and the 20th century became the 21st century, people from all over the world began to play poker on a regular basis. What really happened in order to start this is two fold. The first event that inspired global competition in poker was the advent of the tournament and the creation of the World Series of Poker - the first truly international poker tournament. Globalization continued however and absolutely exploded when online poker was introduced to the world. We are now on a path that sees increased globalization in the poker world and as more poker websites come into existence every day, this trend is only expected to continue into the foreseeable future.