Basically a task in joomla 2.5 represents a function in a controller of your component. When you have an url like index.php?option=com_foo&task=comment.edit the function "Edit" in the controller Comment of the component com_foo is called.
For example here is a controller DPAttachmentsControllerAttachment with a download function The url looks like index.php?option=com_dpattachments&task=attachment.download.
Hope this is what you are looking for.