Chatbots present a conversational interface to an application that attempts to mimic human interaction. Early chatbots used basic pattern matching to understand and respond to textual input. Machine learning has given way to Artificial Intelligence (AI), which uses deep learning and large language models. This is the basis of popular AI chatbots like OpenAI's ChatGPT and Google's Gemini.
History
While the history of chatbots starts in the 1960s, the original idea of "chatting" with a computer is the basis of the Turing Test. The test was published in 1950 by Alan Turing as part of his paper "Computing Machinery and Intelligence". It had the simple premise that if a text-based conversation with a computer is indistinguishable from that of a human, the computer has passed the test.
A chatbot called Eliza was one of the earliest examples. It was written by Joseph Weizenbaum in 1964. Eliza mimicked a psychotherapist and gave the appearance of understanding. Parry was another early example, designed by Kenneth Colby in 1972. It crudely modelled a paranoid schizophrenic and used a rule-based system to simulate human emotions.

Eliza Chatbot by Joseph Weizenbaum in 1966
Public Domain
Learn more about Eliza in this clip of Elaine Anzaldo, a Conversation Designer at Meta.
In 1972, the chatbots Eliza (simulating a psychiatrist) and Parry (simulating a schizophrenic) were connected at an international computer conference. A nonsensical conversation ensued, the opening of which is shown below. (It was recorded by Vint Cerf, one of the "fathers" of the Internet.)

The chatbots Parry and Eliza talking together in 1972. (Eliza is the doctor.)
Public Domain
In 1988, Jabberwacky was the first chatbot to use artificial intelligence, learning from previous conversations. Alice followed in 1995. She was inspired by Eliza and used pattern matching but made no attempt to understand the conversation as a whole. However, Alice was latter improved using a language created for AI called Aiml (AI Markup Language). This allowed the production of more human-like responses and resulted in her creator, Richard Wallace, winning the Loebner Prize Competition in 2000 and 2001.
The early 2000s saw a profusion of chatbots using AI. Chatbots from 2010 onwards tended to use the AI technique, natural language processing:
2001 Smarter Child (Active Buddy): A web-based chatbot on AOL and Windows Live Messenger, based on Microsoft technology. It could provide answers to practical questions by accessing sports, entertainment, news and weather databases.
2005 Mitsuku/Kuki (Steve Worswick): Mitsuku was designed as a general chatbot, using natural language processing. She has won the Leobner Prize (for seeming human) five times: in 2013 and each year from 2016 to 2019. Since 2019 she has been known as Kuki. Both Mitsuku and Kuki take on the persona of an 18-year-old Japanese student who speaks in English. They are implemented using Aiml and borrowed code from an earlier chatbot, Alice.
2010 Siri (Apple): The birth of the now ubiquitous personal assistant. At the time, Apple patented the idea of conversing with a chatbot through messages.
2012 Google Now/Google Assistant (Google): Originally conceived to provide location and time-specific on smartphones, Google Now was expanded to Google Assistant around 2017. Both could respond to voice requests.
2014 Alexa (Amazon): Alexa is the voice assistant built into Amazon Echo smart speakers. It is supported as a voice service on several platforms including Android, iOS, Linux, Windows and Wear. It is supported by a variety of entertainment devices and can also be used in cars through Amazon Echo Auto. Alexa uses natural language processing (NLP) but has limited ability compared with modern chatbots. In 2023 Amazon announced the incorporation of a large language model, similar to that used by ChatGPT, for example.
2014 Cortana (Microsoft): Cortana was a voice-based assistant that Microsoft saw as a key ingredient of future operating systems on Windows Phone and PC. It was named after an AI character in Microsoft's later Halo video games. It was withdrawn from phone platforms starting in 2020. It was officially deprecated in the Windows OS in 2023. Much of the vision that Microsoft had for integrating AI into operating systems was shifted to Microsoft Copilot chatbot.
2022 ChatGPT (OpenAI): GPT stands for generative pre-trained transformer. It uses a large language model (LLM) to build an "understanding" of human speech and knowledge, primarily from Internet sources. It uses the model to generate responses to questions. In more recent implementations, ChatGPT is also used to process and generate audio, video and still images. ChatGPT-4 was released in March 2023. The trained model has grown substantially in each release, as reflected by the number of parameters used in the underlying neural network:
GPT-1: 0.1 billion
GPT-2: 1.5 billion
GPT-3: 175 billion
GPT-4: 1,760 billion (1.76 trillion)
2023 Bard/Gemini (Google): Bard was launched in early 2023 in response to Microsoft's planned announcement to incorporate ChatGPT technology in its Bing search engine. (Microsoft is one of OpenAI's largest shareholders.) However, Bard met a lackluster response from industry, partly due to errors revealed during an early public demonstration of the technology. Google's response was to upgrade Bard to use a larger language model. Bard was relaunched as Gemini later in 2023.
2023 Bing Chat/Copilot (Micrososft): Bing Chat was introduced as a feature of the Bing search engine and Edge web browser. Microsoft's goal was to replace the Cortana chatbot feature built into its Windows operating system with a more powerful AI built on a Large Language Model. This was made possible by Microsoft's investment in, and collaboration with, OpenAI. Consequently, Bing Chat was based on ChatGPT-4. At the same time, Microsoft decided to rename Bing Chat as Copilot. It was built into Windows 11 during 2023 but was also available through the Edge browser. In 2024, Microsoft announced the integration of ChatGPT-4o into Copilot.
Types of Chatbots
Chatbots come in a variety of shapes and sizes, depending on their purpose, abilities and interface:

Types of Chatbots (described below)
© Interaction Design Foundation, CC BY-SA 4.0
Menu-Based Chatbots
Before graphical user interfaces (GUIs) became the most common mode of interaction with computer systems, tree-like menu structures were often used. They provided a limited set of options at a point on a tree. A user's response would determine which branch of the tree was visited next. Menu systems were much easier to use than command-line systems and like GUIs, relied on recognition rather than recall.
Early menu-based chatbots could be implemented using purely text. The chatbot would display a list of numbered menu items. The user would type a number to choose the next action. (Alphabetic labels were also sometimes used.)
The screenshots below show a simple menu-based chatbot that might be used in a text-based environment like WhatsApp.

NumMenu Bot, an example of a menu-based chatbot.
https://github.com/DerXter/NumMenu-Bot
Menu-based chatbots are also possible within a GUI. Users click or tap on the questions themselves or buttons placed alongside.
Rules-Based Chatbots
Rules-based chatbots share some of the limitations of menu-based systems. A set of rules are typically written by developers for a narrow problem domain. Interaction is based on keyword detection, typically following a question and answer dialogue. Rules-based chatbots are very quick and require few resources, but they are unable to address topics outside of their defined domain. They do not learn from interactions and depend largely on provided content.
AI-Powered Chatbots
AI-powered chatbots use machine learning and natural language processing (NLP) to understand a wide range of conversational constructs and content. As a result, AI-based chatbots learn from interactions and can be trained on a broad range of subject areas. AI chatbots generally make use of deep neural networks but do not necessarily use the large language models found in general-purpose chatbots like OpenAI's ChatGPT. Nevertheless, AI chatbots can engage in very convincing, naturalistic, conversations.
Voice Chatbots
Voice chatbots allow speech to be used for interaction. Interactive voice response (IVR) is a basic form of voice chatbot, but like rules-based and menu systems, they are usually limited to specific problem domains and a small set of keywords. With advances in AI, voice chatbots can engage in less structured conversations and are not as limited in terms of the breadth of subject matter that can be addressed.
Generative AI Chatbots
Generative AI chatbots extend the deep learning enabled by neural networks to a range of media beyond simple text: images, audio and video. They are trained on large bodies of material. This enables them to create or modify media in response to requests from users. Generative AIs are the subject of much attention and improvement. They can create realistic output, including high-resolution video containing human and animal forms.

Opera's Aria AI-based chatbot describing what a chatbot is.
Public Domain