The ring in question here is a boxing ring. These, of course used to be circular spaces in a crowd of
onlookers, rather than the square, roped 'rings' of contemporary pugilism. Any Jack the lad who fancied his chances in a bout would throw in his hat - presumably this was a more
reliable way of putting oneself forward than just shouting over the hubbub of the crowd.
The expression dates from at least the early 19th century. The earliest citation of it that I have found is from an 1805 issue of The Sporting Magazine, or as the publishers preferred to call it The Sporting Magazine or Monthly Calendar of the Transactions of the Turf, the Chace, and every other Diversion Interesting to the Man of Pleasure.
from an online dictionary of phrases at https://www.phrases.org.uk/meanings/throw-your-hat-into-the-ring.html