Click in the vertical menu on right side of the detail section. At the bottom of the pane that appears, add a comment in the editing area and click Post Comment.
Users will need view permissions in tasks to perform this action. Depending on the user's project permission settings, they may be able to view all project tasks or just a subset. Watchers specifically added to the task will be able to view it and add comments.