There are two options for leaving a channel:
Hide: Remain a member of the channel but remove it from your list of channels on the left-hand pane.
Leave: Remove the channel your list and opt out of channel completely.
Every channel has an owner, and the owner of a channel cannot leave a channel until setting someone else as the owner of that channel. The owner of a channel may also archive or delete the channel altogether.
To quickly leave or hide a channel, enter the command
/leave in the message window.
Alternatively, hover your mouse over the channel in the list of channels on the left-hand side, click on the "three dots" for more and click on the leave or hide channel button.