Hi Pilgrimyogi,
Well you can do it by train but may depend where you need to get to in the Algarve and how long you have to do it.
Santiago - Vigo, then Vigo to Porto (two trains per day 7:40 ish in morning and 7:40 ish in evening), then, as an example, Porto to Portimao (5 indirect trains a day).
If you want to PM with your approximate time and date of travel and the point on the Algarve you are trying to get to, I'm happy to try and find a route or provide the relevant links for you to investigate at your leisure.
Almost certainly bus options as well.
Regards
Mig