Option 1:
Use the Identify spell or pay a wizard in the city 100gp to do so:
On page 136 of the Dungeon Master’s Guide it states:
The identify spell is the fastest way to reveal an item’s properties. Alternatively, a character can focus on one magic item during a short rest, while being in physical contact with the item. At the end of the rest, the character learns the item’s properties, as well as how to use them.
Potions are an exception; a little taste is enough to tell the taster what the potion does.
Sometimes a magic item carries a clue to its properties. The command word to activate a ring might be etched in tiny letters inside it, or a feathered design might suggest it’s a ring of feather falling.
Wearing or experimenting with an item can also offer hints about its properties. For example, if a character puts on a ring of jumping, you could say, “Your steps feel strangely springy.” Perhaps the character then jumps up and down to see what happens. You then say the character jumps unexpectedly high.
Option 2:
Arcana Checks
Your Intelligence (Arcana) check measures your ability to recall lore about spells, magic items, eldritch symbols, magical traditions, the planes of existence, and the inhabitants for those planes.
Spend at least a minute carefully examining an object, and then I’d have them roll an Arcana check:
DC 10 – the PC is confident the item is magical, but is unable to ascertain its nature.
DC 15 – the PC is able to guess the rough properties of the item, and may attempt to use it. However it does not know how many charges it has, and may not necessarily be able to work out the command word just yet, if it has one. More likely he or she knows what will happen when the command word is uttered, but will need another Arcana roll (once per rest) to correctly guess what it is.
DC 20 – the PC recognizes the item and after a short period of experimentation (a short rest) is able to use its full powers.
Natural 20 or DC 25 and above – the PC recognizes the item and can use its full powers immediately. You may even rule they are able to attune to the item straight away.