In the British Royal Navy, a third rate was a ship of the line which from the 1720s mounted between 64 and 80 guns, typically built with two gun decks (thus the related term two-decker). Years of experience proved that the third rate ships embodied the best compromise between sailing ability (speed, handling), firepower, and cost. So, while first rates and second rates were both larger and more powerful, the third-rate ships were in a real sense the optimal configuration.
When the rating system was first established in the 1620s, the third rate was defined as those ships having at least 200 but not more than 300 men; previous to this, the type had been classified as "middling ships". By the 1660s, the means of classification had shifted from the number of men to the number of carriage-mounted guns, and third rates at that time mounted between 48 and 60 guns. By the turn of the century, the criteria had grown and third rate carried more than 60 guns, with second rates having between 90 and 98 guns, while first rates had 100 guns or more, and fourth rates between 48 and 60 guns. By the latter half of the 18th century, they carried between 500 and 720 men.
This designation became especially common because it included the seventy-four gun ship, which eventually came to be the most popular size of large ship for navies of several different nations. It was an easier ship to handle than a first- or second-rate ship, but still possessed enough firepower to potentially destroy any single opponent other than a three-decker. It was also cheaper to operate.
By the end of the 18th century, ships of the line were usually categorized directly by their number of guns, the numbers even being used as the name of the class, as in "a squadron of three 74s", but officially the rating system continued until the end of the Age of Sail, only undergoing a modification in 1817.
Note that the use of terms like "third-rate" in literature can lead to confusion: The French Navy had a different system of five rates or rangs, but some British authors use the Royal Navy's rating of "third rate" when speaking of a French 74.