The 3DS has a Play Coins feature that allows you to earn coins by walking around with your 3DS in sleep mode. In Animal Crossing: New Leaf, you can use Play Coins to purchase fortune cookies from the Nooklings' shop. This page explains how to earn Play Coins.
To earn Play Coins, turn on your 3DS, go to the home screen, and close the 3DS, then walk around while carrying it in your pocket or bag. The 3DS will keep track of how many steps you take when you walk around. For every 100 steps, you get 1 play coin. You can earn 10 coins per day, up to a maximum of 300 play coins. For more information, check out Nintendo.com's article on How to Earn Play Coins.
In Animal Crossing: New Leaf, you can use Play Coins in the Nooklings' shop. They sell fortune cookies, which can only be purchased with 3DS Play Coins.