San Sebastian is a town in the north of Spain near the french border.
Hitching Out
Take the local train to Irun and walk to the highway. At the border there is a toll-gate, where you can ask for lifts. It's easy to go to Bordeaux, France and it should also be possible to find a ride heading into Spain or Portugal.