iOS
Open the conversation with the contact you want to change. Tap their profile picture in the top right corner to open Conversation Settings. Tap "Edit" and enter a new display name for the contact.
Android
From your list of chats, long press on the contact you wish to change the display name of. Then tap "User details" and the pencil icon next to their display name (✏️) to edit. Enter the new display name and hit the tick (✓) button to save.
Desktop
From your list of chats, right-click on the contact you want to change. Click "Set Nickname". Enter a new display name and hit "Save".