The Local train service is small, cheap and reliable. Here are some links to the services.
Here are some tools to help you with your travel plans to and from Lagos. The Algarve and the rest of Portugal are fantastic. If you have time in your travels explore the country before you move on.