In order to archive a task, all you have to do is press the archive button at the top of the task details page.