I may have misunderstood but from casual browsing through some terraria questions I understand that when crafting some weapons/gear you sometimes receive enchantments or bonuses of some sort on them. How does this work, or did I misunderstand?
With few exceptions, all weapons and accessories (but not armor) will often have random "modifiers" applied when they're generated, crafted, or purchased. These modifiers can be positive or negative stat adjustments. There are a finite number of possible modifier sets that can be assigned to a given type of item. Each distinct modifier set confers a unique prefix to the name of the item in question, such as "Rapid," "Sharp," "Powerful," or "Keen." The full list of all possible modifiers is far too lengthy to include here in full, but it can be found on the official wiki.
Once you obtain access to the Goblin Tinkerer NPC, he will provide you with an extremely valuable service: reforging. Via reforging, you can pay some money to "reroll" the modifiers on a piece of equipment, by replacing the item's current modifiers with a new random set from the above list. If you seek to maximize your equipment's effectiveness by trying to get strong modifiers, reforging is an excellent way to do so, though it can be quite expensive to reforge higher-quality items.
When the Goblin Tinkerer reforges an item, it will always have a modifier. It is not possible for the Tinkerer to reforge an item and leave it without a modifier.
A common technique to beef up a character's toughness is to reforge most or all of his/her accessories to +3/+4 Defense.
Generally speaking, the best modifier for melee weapons is Legendary, the best for ranged weapons is Unreal, and the best for magic weapons is Mythical. Some exceptions exist, however; for example, modifiers that enhance weapon knockback aren't possible to obtain on weapons that innately have zero knockback.