Right-click a block while holding the Totem of Returning to bind it to that location. The next time you use the totem, you will be returned to that location, destroying the totem in the process.
If the Extend Totem of Returning feature is enabled, the totem may be used more than once before it is destroyed. The totem's tooltip will show you how many uses remain, as well as the XYZ co-ordinates of its bound location.
Totems of Returning occur naturally in Abandoned Mineshafts, Nether Fortresses and Woodland Mansions. If the Illusioners feature is enabled, there is a 50% chance that the illusioner will drop a Totem of Returning when killed by a player.