You will get a legendary shard when you dismantle gear that is exotic or legendary. You can use these shards to purchase gear from a vendor named Xur and you can also use them when infusing weapons and armor pieces. Xur is the same guy from the first game who randomly shows up in different places. There is no guide to find him in advance, so just keep an eye out for him. Might be handy to hold onto these until you know what you want to spend them on. Legendary and exotic gear is not that common so you wont have a massive abundance of this currency until you are much further into the game.