To delete a comment, head to the task and open the comments.
On mobile:
Press and hold the message. The Delete option will appear after a few seconds.
On the Web:
Click on the red bin icon to the left of the comment.
How to delete a comment inside a task.