How does Puck get turned into a Donkey in 'A Midsummer Night's Dream'?

Puck doesn't get transformed into a donkey.

Puck, also known as Robin Goodfellow, doesn't get turned into a donkey. He, in his characteristic mischeviousness, transforms Bottom's head into a donkey's. Bottom is in the woods rehearsing a play (Pyramus and Thisbe) that will be presented for Theseus and his wife's wedding. Puck isn't impressed and instead, bored, so he changes Bottom's head into a donkey's and leads the poor weaver senselessly around the woods and into where Titania is. Then Titania wakes up and falls in love with Bottom the Weaver, in this case, Bottom the donkey. She falls in love with him because she has some flower-love-potion type rubbed on her eyes by her angry and annoyed husband, Oberon.

In the end, Bottom returns to his troupe of actors and perform the play for Theseus' wedding day.