There are two main train station in Bangkok:
Hua Lamphong is in the middle of Bangkok, and is Bangkok's main train station. It is close to Chinatown, the river and Silom.
This is on the other side of the river, and isn't as busy as Hua Lamphong.
You can buy train tickets at the train stations. There are also booking agents in areas like Khao San Road.
We recommend searching the web: Seat61 is a good resource