Instant messaging works by initiating a connection between two or more persons over the internet by using a chat server. Once a connection is established, users can send messages, share files, and make audio or video calls through an instant messaging platform.