Loyalty is an enchantment in Minecraft that can only be applied to a Trident. If a player throws a Trident, then the Loyalty enchantment makes that the Trident comes back to a player's hand like a boomerang.
When the Trident hits an enemy or a block surface, the Trident comes back to a player after a short period of time. The higher level of enchantment, the faster it comes back. For example, Loyalty III enchantment will work faster than Loyalty II enchantment and so on.
Note: It is not compatible with Riptide enchantment.
Related: Best Minecraft Survival Challenges
If a player dies while the Trident is coming back to the player's hand, then the Trident drops on the ground like any other item. It can despawn, so make sure to pick it up after you come back to the location of your demise.
Trident only comes back when it hits something or someone, but in Minecraft Bedrock Edition, it can also come back if thrown into the Void. After traveling about 15 blocks, it comes back. Minecraft Java Edition will just despawn, and you will lose the Trident if it is thrown into the Void.
For more articles and guides on Minecraft make sure to check out How to find your Minecraft world seed on Pro Game Guides.