To build a station, you need to build railroad tracks first. Just build some railroad tracks as shown in the left image. Then use the station building tool to build station buildings on the railroad tracks. The result should look like the right image now.