To purge messages like spam, or just to clear a channel. You can simply run the
/purge <amount> slash command. By doing this, you can delete up to a maximum of 100 messages per command use.
After the messages have been purged, a message will send letting you know that the messages were deleted. It deletes itself after 5 seconds.