The first video game consoles emerged in the early 1970s. Ralph H. Baer devised the concept of playing simple spot-based games on a television screen in 1966, which later became the basis of the Magnavox Odyssey in 1972. Inspired by the table tennis game on the Odyssey, Nolan Bushnell, Ted Dabney, and Allan Alcorn at Atari, Inc. developed the first successful arcade game, Pong, and looked to develop that into a home version, which was released in 1975. The first consoles were dedicated to only a set group of games built into the hardware. Programmable consoles using swappable ROM cartridges were introduced with the Fairchild Channel F in 1976 though popularized with the Atari 2600 released in 1977.
Handheld consoles emerged from technology improvements in handheld electronic games as these shifted from mechanical to electronic/digital logic, and away from light-emitting diode (LED) indicators to liquid-crystal displays (LCD) that resembled video screens more closely, with the Microvision in 1979 and Game & Watch in 1980 being early examples, and fully realized by the Game Boy in 1989.
Since the 1970s, both home and handheld consoles became more advanced following global changes in technology, including improved electronic and computer chip manufacturing to increase computational power at lower costs and size, the introduction of 3D graphics and hardware-based graphic processors for real-time rendering, digital communications such as the Internet, wireless networking and Bluetooth, and larger and denser media formats as well as digital distribution. Following the same type of Moore's law progression, home consoles were grouped into generations, each lasting approximately five years, with consoles within each sharing similar technology specifications and features such as processor word size.
Find more history on Wikipedia.