If you want to travel by train from Bangkok to Laos (Lao P.D.R), there are a couple of ways you can get to the border using the State Railway of Thailand's trains.
The most popular route is to travel from Bangkok to the border town of Nong Khai in the North-East of Thailand, located along the Mekong River and just a short journey away from the capital of Laos, Vientiane.
The other way is to catch a train to Ubon Ratchathani, which is the gateway to Southern Laos and the town of Pakse.
The best way to get to Vientiane by train from Bangkok is to catch a night train from Bangkok to Nong Khai.
From Nong Khai Railway Station you have a choice of taking the short train trip over the Friendship Bridge to Thanaleng Station just over the border in Laos, or taking a shortish walk to the border crossing and catching a bus over the bridge.
Either way, you will then have to take another bus or minibus for the rest of the journey to Vientiane.
From Vientiane, you can easily continue your journey to the popular destinations of Vang Vieng and Luang Prabang by bus or minibus.
If you want to travel the other way around from Vientiane to Bangkok by train, the easiest option is to catch a local bus from Vientiane bus station, straight to the border, take the bus over the friendship Bridge, then walk or take a tuk-tuk to the railway station.
Click on the Nong Khai timetables link above to see all the trains from Nong Khai to Bangkok.
If you want to start you travels in Southern Laos, your best option is to catch the night train from Bangkok to Ubon Ratchathani.
From Ubon, you can then catch a bus all the way to Pakse in Champasak province, Laos, or just catch one of the much more frequent minibuses that drop you off close to the border at Chong Mek, then another minibus onto Pakse.
The old French colonial town of Pakse is located where the Sedon River and Mekong River converge and is the gateway to popular tourist attractions such as the Bolaven Plateau, Mekong Falls and Si Phan Don - the Four Thousand Islands.