If you are the owner/moderator of a channel, you can edit or delete anyone's messages within that channel.
Hover over the message and go to the three dots at the end of the message box.
Once you click it, you will see a drop-down menu, which is where you can select "Delete" or "Edit". Editing a message will show a small pencil icon next to it to show that it has been changed.
If you are just a user in a channel, you can only delete your own message.
Hover over the message and click the three dots at the end of the message box.
From the drop-down menu, select "Delete". You may only delete your message within 60 minutes after posting it.