To pin a message, long-press on the message you want to pin and select the pin icon that appears at the top of the screen. On the desktop, you can click the three-dot menu on a message and choose Pin.