Arcade games go back a long way. By the end of the 19th Century, you could go to an amusement park and insert a coin to shoot targets, toss balls, or get your fortune told. Pinball machines also go back to the 19th Century, and in the first half of the 20th Century they appeared in bars, restaurants, and shops, creating the market that arcade video games would step into.
The first coin-operated video game was Galaxy Game, a version of Space War. One machine was produced and installed at Stanford University in September 1971. Two months later, Computer Space, a one-player multi-directional Shoot'Em Up based loosely on Space War, became the first commercially-available coin-operated arcade game. It was created by Nolan Bushnell and Ted Dabney, who would found Atari the following year. Computer Space wasn't a success, as gameplay was too complicated. So Bushnell created the much simpler Pong, the first successful coin-op arcade game.
More games followed, but for most of the 1970s arcade games didn't have dedicated venues; they stood in bars, restaurants, bowling alleys, supermarkets, and gas stations. That changed with the release of Space Invaders and Asteroids. By the end of 1979, video arcades were starting to appear in North America, Europe, and Japan. The Golden Age of Video Games had begun.
1980 saw a wave of classic games including Pac-Man, Centipede, Defender, and Missile Command. Arcades sprang up all over the place, and crowds of kids flocked in. More great games came in 1981-83, like Donkey Kong, Frogger, Dig Dug, Joust, Q Bert, and Dragons Lair. But a bad case of Follow the Leader meant that the arcade market was also saturated with imitations, so The Great Video Game Crash of 1983 happened gradually from 1983-85.
After 1985 in North America, things were never the same. Arcades had a resurgence in the early to mid '90s, due to the popularity of Fighting Games, but declined again with the rise of arcade-quality consoles. Arcade games returned to where they were from 1972-78 — an extra source of revenue for restaurants, movie theaters, and shopping centers, or part of a larger gaming venue like Chuck E. Cheese.
In the UK, arcades were popular at seaside resorts until the mid-1990s, when the leap to 3D graphics meant higher prices than kids could pay.
In Japan, arcades (known as game centers) remained popular, and as with consoles, development moved over there. The Japanese created or codified new genres, such as the Fighting Game, Cute'Em Up, and Bullet Hell. They also standardized arcade hardware: Data East released the first general-purpose arcade board in 1980, and the Japan Amusement Machinery Manufacturers Association (JAMMA) introduced the eventual world standard for arcade cabinet wiring in 1985. To this day, the biggest franchises in the aforementioned genres usually get an arcade version of each new installment- if it doesn't debut in arcades first.
The term "arcade game" was also used more generically, especially in the 1980s, for games created for consoles and/or computers that imitated the fast-paced action of real arcade games. This usage of "arcade" has largely faded away, though sometimes its use on old game boxes and such still causes confusion.