There are 3 kinds of currency in this game. The basic Bits, rare Gems, and Hearts which you get from friends.
Bits can be obtained from Shops, Daily Rewards, leveling up, finishing Quests, Flim Flam's Balloon Pop, the Flying Minigame, using extra Harmony Shards on a Harmony Stones, shaking bushes/haystacks around Ponyville, feeding Parasprites, finding the "pony in the box," and from making purchases using real currency.
Gems can be obtained from Daily Rewards (day 4 and 5), leveling up, finishing some Quests(mainly from Holiday Quests), Flim Flam's Balloon Pop (Heart or Gem game), sometimes when feeding Parasprites, sometimes after finding the "pony in the box," sometimes after clearing large rocks, making purchases using real currency, and completing offers in the Currency Store.
Gems can be used to welcome some Ponies to Ponyville, purchase some Shops, purchase some Decorations, drive back the darkness, play Minigames, play Flim Flam's Balloon Pop, speed up construction of buildings, instantly produce items from Shops, and skip requirements on some Quests.
Hearts are obtained from your friends. Every day you can send each of your friends a "Gift" of one Heart. Treasure chests left by your friends contain a Heart as well.
To welcome all ponies to Ponyville, you will need at least 321,100 Bits, 1,140 Hearts, and 5,515 Gems.
To purchase all shops, you will need at least 371,125 Bits and 810 Gems.
To drive back all of the darkness you will need ..... Bits or ..... Gems.