Hi Marta,
Yes of course - if you look at the individual Competencies there is a section "Evidence items" and here you can assign courses which have course completion enabled, as either Mandatory or Optional courses for achieving the competency.
So you assign courses to the competencies, and then when students complete all the courses that are mandatory for a competency they should achieve the competency. Also you can then add Competencies to a learner's Learning Plan, and that will automatically pull all the courses that are linked to that Competency into the Learning Plan.
You can also assign competencies to Positions and Organisations in the same way, and if you modify the Learning Plan template to enable the "Automatically assign by position" and "Automatically assign by organisation" and "Include linked courses" options in the Competencies tab of the Workflow in the Template, then any competencies linked to the position or organisation of the learner will also have their appropriate courses pulled into the plan automatically.
You should check out http://help.totaralms.com for more details