The War of the Ring takes place during Tolkien’s Third Age.
The Third Age is the historical period in Middle-earth that includes the events of The Hobbit and The Lord of the Rings. It begins after the defeat of Sauron at the end of the Second Age and ends after the destruction of the One Ring and Sauron’s final defeat.
The War of the Ring is concentrated near the end of the age, in the years 3018 and 3019 of the Third Age. Frodo and Sam destroy the Ring in 3019, and the age concludes soon afterward with the departure of the Ring-bearers and the crowning of Aragorn.
The First Age is chiefly associated with the wars against Morgoth, while the Second Age includes the forging of the Rings of Power and the rise of Sauron. The Fourth Age follows the Third Age and is linked to the dominion of Men.