You can use the /away command to tell other users that you are still connected to IRC, but that you are away from your terminal for a short while and can’t read messages right now.
/away
If any user sends a message to you while the away command is on, then the server will send them back a message to the effect that you are away, and they will know that you are at least logged on, and can try again later.