Chats show a 😃 Smiley emoji when your friend returns to being active. It looks like this:
The emoji appears briefly to indicate the recipient has just switched to the current chat:
When the 😃 smiley goes away, a blue dot remains to indicate the recipient is still looking at the chat:
When both disappear, your friend has left!