Getting from Bilbao to San Sebastian is no problem with the great public transport connections in this area.

By Bus

The main bus companies which run services between Bilbao and San Sebastian are ALSA and PESA.  ALSA has up to 3 buses an hour, taking between 1hr10m and 2hrs with two different classes of travel, and PESA has a bus every hour on the hour and sometimes also on the half hour, again taking between 1hr10 and 1hr30.

By Train

There is no mainline RENFE trainline connecting Bilbao and San Sebastian.  It certainly is possible to get from Bilbao to San Sebastian by train, however it is really only of serious interest if you are trying to get somewhere along the line between the two cities, as it is basically a commuter train stopping at every stop and taking around 2 ½ hours to do what is an hours trip by bus.  It’s run by Euskotren (which often does not appear on rail search websites), and timetables and maps can be found on their website.  If you’re interested in this, the main stop in Bilbao is Atxuri, and in San Sebastian, Amara.

Bilbao Airport (Loiu) to San Sebastian (and vice-versa)

To get from Bilbao Airport to San Sebastian there is a direct bus (via Zarautz on request) run by PESA.  It stops outside the terminal building, turn right as you leave the terminal, and goes directly to the central bus station in San Sebastian.  It leaves the airport every 45 minutes past the hour and takes 1hr20m.  From Bilbao Airport to San Sebastian it is not possible to buy tickets in advance, only from the bus driver on boarding the bus.  There are no return tickets, the single ticket costs 16.50 Euros. For comparison, a taxi costs about 160 Euros.  

On the way back from San Sebastian to Bilbao Airport, it is not possible to pay the driver as you board the bus.  You will need to buy/reserve a ticket from the PESA office around the corner from the Bus Station (100m) in Sancho el Sabio Hiribidea. At time of writing (August 2013) credit/debit cards were not accepted. Be aware that the bus will not be identified as a PESA bus. They are marked "Lurraldebus" and they do not necessarily pull in at the PESA stop. Look for bus number 50 or you risk missing your bus.

Update: San Sebastian now has a new underground bus station next to Maria Cristina bridge. The ticket offices are downstairs, and the correct gate for buses is clearly identified on computer screens.

Reservations for San-Sebastian to Bilbao Airport can be made online and paid with credit card. Search for DONOSTIA/SAN SEBASTIAN and LOIU AEROPUERTA.  You will need to print your reservation and show it to the driver.