You probably remember that in Spanish you usually place small words like me, te, le, nos, and les before the verb.
Yo le compro un regalo.
I buy him a present.
But if there are two verbs and the second one is an infinitive, you can place these small words either before the verb or attach them to the infinitive.
¿Me puedes dar esa mochila?
¿Puedes darme esa mochila?
Can you give me that backpack?
La maestra te va a dar una nota buena.
La maestra va a darte una nota buena.
The teacher is going to give you a good grade.