Starting with a pencil sketch... and ending with the pen tool on Photoshop to trace the lines and do other stuff!
What the hell is Pinkie doing? I'm asking this not because I don't know (I did this, that would be ridicolous), but because I think it's not that clear to others; I showed this to my brother and he couldn't come up with an answer.
But who the hell cares, I uploaded it in 1920x1358, so you can zoom as much as you want to fully understand the picture! While the setting... well, if you've seen some of those Season 3 spoiler pictures you can guess what they're up to: even though there's no real spoiler, since for those who don't know anything it's just a random setting
And now the little P.S.: Pinkie is using Rarity's scarf as a ribbon to mess with Rainbow's mane XD