How Does Chat Work?

Man and woman texting on phone in front of chalkboard with illustrations
Chat rooms, once hugely popular in the '90s, were replaced by social networks.

Justin Lewis / Getty Images

Chat rooms are a unique way to meet hordes of new people in real-time. Unlike instant messaging, chat connects people together in a single window for text-based conversations. You can also send voice messages, connect your webcam and video chat and more from some chatrooms.

In front of the computer screen, it may seem effortless to sign in and choose a topic from a directory of virtual rooms. Behind the scenes, however, a network of computers and servers are communicating at lighting speed over copper and fiber optic cables to deliver the seamless experience you can find across chatrooms on IM clients and other free services.

In this illustrated step-by-step guide, we will explore what happens after you sign in.

Step-by-Step: How Chatrooms Work

  1. Your computer connects to the chat server
  2. Commands are sent to the server
  3. You are connected to the chatroom
01
of 03

Your Computer Connects to the Chat Server

Chat Server

Lifewire / Brandon De Hoyos

A protocol is used to connect people for real-time communications online, like when you meet with friends in a chatroom. When you first sign in to your IM client or a chat service, this protocol will connect your computer to the program’s servers. One such protocol is ​Internet Relay Chat, also known as IRC.

02
of 03

Sending Commands to the Chat Server

Sending Commands to the Chat Server

Lifewire / Brandon De Hoyos

When you perform an action to open a chat, commands are sent via your keyboard and mouse to the server. The ​server will then send byte-sized units of data called packets to your computer. The packets are collected, organized, and assembled to produce a directory of available chat room topics if one is available.

On some instant messaging clients, chatroom listings are accessible through drop-down menus. Selecting a specific room will result in your computer sending a command to the server to open a new window and connect you to the chat.

03
of 03

How Chat Messages Are Sent

Chat room messages

Lifewire / Brandon De Hoyos

When you are connected to a chatroom, you can send real-time messages which can be seen by all the people in the virtual room. Your computer will transmit packets containing the message you wrote to the server, which then collects, organizes and re-assembles the data, down to the very font, text size, and color used in some instances. The message is then echoed by the server to every other user in the chatroom.

Some chats offer you the ability to private message another user. While the message may appear directly on the screen along with other users' messages, it can only be read by its intended recipient. Other services, however, deliver the message in a separate window.

On a server, chatrooms are sometimes referred to as channels. You can move between channels or in some cases access multiple channels at once, depending on the client or service you are using.