Peanut butter fudge
It depends some on the recipe you used. Stirring the sugar syrup mixture will cause crystals to form and the fudge will be grainy. Cooking it past the soft ball stage, about 240F, will also make it grainy. If you tried making it the old fashioned way, it may be the chocolate temperature was still too high when you started beating. You can also get grainy fudge if you beat it too long after adding in the chocolate. Making fudge, even using the "fantasy" recipes with marshmallow creme, is still best done using a thermometer rather than timing on the clock. You can sometimes rescue a grainy fudge though. You will need a bit of cream to do it. You put enough cream in the saucepan to cover it, and then crumble in the unsatisfactory fudge. Heat it over mild heat to melt the fudge and stir to incorporate the cream. As soon as the fudge is softened quit stirring. You want it to melt and go smooth. Do this on a low heat, and with a thermometer. You want the temperature to reach between 235F and 240F - no higher. Remove it from the heat, and pour it out into your buttered pan, and leave it to set up again.