My husband and I will be traveling to Madrid this October to visit our daughter who is studying abroad. This is our first time in Spain. We are avid hikers and like to go "off the beaten path" experiencing small, unique towns while still hitting some of the must see areas. As I have been researching Spain, it appears that heading south through Andalucia region may be better than heading north. We are planning 14 days so appreciate any itinerary advice you may have (must-see towns). We could rent a car if that is the best option for the itinerary.
I can't give you any hiking advice because we did not go hiking while in Andalucia. But I can give you advice on important cities to visit while you are in Andalucia. The three most important cities, historically and culturally, are Sevilla, Granada and Cordoba. All 3 are wonderful cities with important Moorish, Christian, and Jewish history and culture.
Sevilla has the Real Alcazar and Cathedral, along with other beautiful sites and some hidden gems, such as Casa di Pilatos. Cordoba has the Mezquita, Alcazar gardens, and a hidden gem (Palacios de Viana). And Granada, of course, has the magnificent Alhambra. Visually, each city is very different from the other. It makes sense to take the train or bus to each of these cities. A car would be more of a nuisance. The train tracks to/from Granada are not finished yet, so you could take the ALSA bus to/from Granada.
Also, October is the perfect time to visit Andalucia as it is very, very hot during the summer months.
There are also white towns that other people can give you information on. We didn't visit those. My sense, from my research, is that the white towns are "lesser" destinations than the 3 cities I mentioned. I know there is hiking in the region so hopefully someone else can chime in here regarding the hiking. I think a car would be beneficial to see the white towns and go hiking.
If you want some coastal ambiance, I recommend Malaga which is a wonderful city located on the Mediterranean.
Will you be spending some time in Madrid? I also enjoyed Madrid very much. If you are interested in art, Madrid has some outstanding art museums.
To give you a sense of how much time this will take, we had 15 nights, and spent them in Madrid (4 nights), Toledo (1 night), Cordoba (2 nights), Granada (2 nights), Malaga (2 nights) and Sevilla (4 nights).
I also recommend buying some good guidebooks. I typically use Rough Guides, Michelen Green Guide, Fodors, and/or Rick Steves.
The difficulty with wanting to go "off the beaten path" AND visit "must see" 's, is that the latter are not off the beaten path ;) Kmkwoo gives a lot of great advice and a good rough itinerary. Once you get a guide book (or a few, I like to sit on the floor at a book store and peruse all they have and choose the tow-three that work best for me, and then I see if the library has them), you will see that there are stand-out places that most people visit, and with two weeks, you won't have a lot of time to do off the beaten path and must see's. A few off the beaten path in southern spain are Albararacin, Teruel, Cuenca, and Ubeda/Baeza. Im sure there are many more. Once you decide on an itinerary, you can google search hikes in that area, but again, with so much to choose from, the hiking might fall by the wayside (especially as you will be getting 20,000+ steps/day just site seeing).
I'll make an "off the beaten path" suggestion. You can go west towards Extremadura, it checks the small town box, the hiking box, and the less-visited box. You could go as follows by car in 13 nights (to leave room for tweaks) :
Madrid 3N
Segovia 1N - or a full day stop on the way to...
Salamanca 2N
La Alberca 2N - beautiful mountain village in a remote, wooded, hilly region with good hiking. Candelario is a similar option, but I've never been.
Trujillo 3N- Town that didn't change much since the days of the conquistadores. From there can day trip to Monfragüe National Park, which apparently has good hiking (only passed through). Also, Cáceres is worth a stop.
Guadalupe 1N - stunning monastery town in the hills
Toledo 1N
Reading over it, it's a bit tight, but it's an example of how you could combine famous and less famous places without straying too far from Madrid.