Its a very generic question let me try to answer it
Task of the MAC layers -
1. Mapping between Transparent and Logical Channels
2. Error Correction (Through Hybrid ARQ)
3. Priority Handling with Dynamic Scheduling
4. Logical Channel Prioritization
Following is the workflow