You’ll appear active whenever you’re interacting with Slack in a web browser. After 30 minutes of browser inactivity, you will be marked away. As soon as you re-engage with Slack in the browser, your availability will update to active again.

If you are using Slack mobile apps:

You’ll appear active when the Slack app is open. When you switch to another app, close the Slack app, or lock your screen, you’ll remain active in Slack for 30 seconds before updating to away.