So in D&D, attacking involves two separate rolls: an “attack” roll to see if you hit, and if you do, a “damage” roll to see how much damage you do. The +5 bonus is on the attack roll—it’s a way of showing how accurate you are. The 1d8 is the base damage for a longbow, and then you have a +3 bonus because of your other stats.
Thus, an attack for you involves rolling a twenty-sided die (1d20), and adding +5 to whatever you rolled (1d20+5). The DM checks that result against your target’s Armor Class (AC), and if you meet or exceed the AC, you hit. Then you roll an eight-sided die (1d8) and add 3 to whatever you rolled (1d8+3). The target loses that many hit points.
As an example, suppose you attacked a target with 15 AC and 20 hp. You would roll the d20, and add 5, so if you rolled a 12, you would add 5 for 17, and then “17” would be your attack roll against them. Since 17 ≥ 15, you hit. Now you roll 1d8+3 piercing damage—suppose you roll a 6 on the d8. You add 3 to that for 9, and that’s your damage. Now the target has 11 hp, since they had 20 and you deducted 9.
The “piercing” part doesn’t usually matter, but some creatures might be especially vulnerable to piercing damage—or especially resistant to it. In those cases, your roll of 9 piercing damage might deduct more or fewer than 9 hp from the target.