In the DnD, you can earn different types of rewards for doing quests. THis rewards can be gold, Xp, and/or magical items. Money and Xp are easy to get but magical items are more valuable. Your DM can allow you to purchase magical items but they wont be that strong. Sometimes at the end of boss fights, the DM will give you magical items in boss loot.
The rarities to loot are as followed with 1 being the weakest and 6 being the strongest.