Away (AFK)

When you step away, the other players of your instance see you as AFK (away from keyboard) on your nametag and in the list of players. You have nothing to switch on: the game notices it.

You playYou are AFK whenYou are back when
With keyboard and mouseyou have not touched the keyboard or the mouse for 5 minutes, or the game's window has been in the background for 5 minutesyou touch the keyboard or the mouse, or come back to the game's window
In VR on a PCyou take the headset offyou put it back on
On Meta Questyou take the headset off, or the game has been in the background for 5 minutesyou put the headset back on, or come back to the game

In VR on a PC, the keyboard, the mouse and the game's window on the screen do not count: only the headset does. A headset without a presence sensor never shows you as AFK when you take it off.

You stay AFK when you change world or server, until you come back.

What the others see

Your picture on your nametag darkens with "Zz" over it, and the list of players of the instance shows it next to your name. Both go as soon as you are back.