A four hours from Madrid or six hours from Barcelona travel, you could also arrive to Logroño by bus. Alsa is the largest bus company of Spain.
Several trains arrive to Logroño from the whole country. More information is available at Renfe website.
The easiest way is to plan your trip using Google Maps :)