The best option to get to Spain via trains is the Eurail. The only problem is that if you want to travel to Spain from outside Europe, there are no Eurail trains available. However, other railway networks, operated by private companies, are available. If you absolutely have to travel via trains, then the best thing to do would be to fly to a destination within the European Union, and take a Eurail train to get to your desired location in Spain. The countries that offer the maximum connectivity to Spain and its various cities includes France and Italy. Apart from the Eurail, some of cities within the European Union are connected to Spain via other railway networks.