At a basic level, a TASK is a WAY to call an Ansible module. In PLAYBOOKGOAL of a play is to map a GROUP of hosts to some well-defined roles, represented by things Ansible calls tasks.
The task file is the main part of a role. If roles/<role_name>/tasks/main.yaml exists, all the tasks therein and any other files it includes will be embedded in the play and executed.