When a task is closed, it is hidden from the board.
However, you can always access to the list of closed tasks by using the query status:closed in any search form or simply choose Closed tasks from the filter drop-down.
There are two different ways to close a task, from the task drop-down menu on the board:
Or from the task sidebar menu in the task detail view:
Note: When you close a task, all sub-tasks not completed will be changed to the status "Done".