Every magic item has a rarity that signals how powerful it is and roughly what level it suits: common and uncommon for low levels, rare for mid, very rare for high, and legendary for the most powerful gear. Artifacts are unique, story-defining items outside the normal scale.
Rarity also guides price. The Dungeon Master’s Guide gives rough value bands — common items are worth tens of gold, while legendary items run into the tens of thousands. These are guidelines for buying and selling, not fixed prices; your DM sets the final number.
Rarity is separate from attunement. Some items require you to attune during a short rest before their magic works, and you can be attuned to at most three items at once. More powerful items are likelier to need attunement, which stops a character from stacking too many bonuses.