The German railway service (Deutsche Bahn) provides an online timetable which brings together the rail services of all operators across Europe. It can plan any journey easily:
http://www.bahn.de/i/view/GBR/en/index.shtml
(Your route would start with St Pancras International to Paris Nord, then the Metro to Gare d'Austerlitz, from where the night trains to Spain depart).
This site has loads of useful information (including, for example, details of how to get across Paris) about train travel from the UK to Spain:
http://www.seat61.com/Spain.htm
Alternatively, start by taking a train to Portsmouth (or possibly Plymouth) and then the ferry to Santander:
http://www.brittany-ferries.co.uk/286
Other relevant links:
National Rail (for trains within the UK):
http://www.nationalrail.co.uk/
RENFE (for train services in Spain):
http://www.renfe.es/h...os/english/index.html
Rail Europe (for international train tickets):
http://www.raileurope.co.uk/
Chris