Normally, you’ll automatically switch to idle on Discord if you’re away from the keyboard (AFK) for a certain amount of time. According to Discords users, the automatic idle time is about 5 to 10 minutes. https://support.discord.com/hc/en-us/community/posts/360033558391-Make-automatic-idle-an-option-to-be-disabled-. You can also manually select idle in the pop-up menu. Unlike the auto-idle status, manually setting idle will allow you to stay that way indefinitely.
When there’s mouse movement or keyboard usage again, you get put back into online status unless Idle status was set manually. Idle displays as a yellow moon-shaped indicator on your profile. Currently, there is no option to disable automatic idle on Discord.