The name Algarve comes from the Arabic al-gharb, "the west", and the Moors ruled this corner of Iberia for roughly five centuries. Silves was their regional capital, and the Portuguese took the last of it in the 13th century. Then the coast turned to the sea. Lagos became the port of the 15th-century voyages down the African coast, and from 1576 to 1755 the capital of the whole Algarve, until the earthquake and tsunami of 1755 destroyed the old town. What visitors come for today is older than any of that: golden cliffs, sea caves, and about 200 km of beaches.
The Algarve is also the most visited, most built-up stretch of Portugal, and it's best to say so up front. July and August are crowded, car parks at the famous beaches fill early, and Albufeira's strip is package-holiday nightlife with a beach attached. The good news is how much the coast changes from west to east. West of Lagos the Atlantic is rough and cool, with surf beaches and wild cliffs. Around Carvoeiro are the postcard cliffs, with arches, stacks and the Benagil cave. East of Faro, in the Sotavento, the coast is a lagoon, the Ria Formosa, with sandbars you reach by ferry, and the water is slightly warmer. Five days is just enough to taste all three without living in the car.
The plan runs from west to east, one corner of the coast per day. Day one is Lagos, day two a long drive to Cabo de São Vicente and the surf coast, day three the cliffs of Marinha and Benagil with lunch and sunset in Carvoeiro, day four Silves and Faro, day five Tavira and its island. It uses two bases, because moving hotels every night eats a beach holiday: nights one to three in Lagos, nights four and five in Tavira, with the move east on day four. Carvoeiro, in the middle of the cliff coast, is the alternative if you'd rather unpack once. Start on a Tuesday if you can: the bone chapel in Faro is closed to visitors on Sundays and open only in the morning on Saturdays, and Silves's archaeology museum is closed on Mondays. Late October is a good time, with warm days and thin crowds, but see the tips for what changes. More on the country in our guide to Portugal.