The train station of Landstuhl (Germany). Closest railway station to Ramstein Air Base for long-distance trains in direction of Frankfurt, Munich, Berlin, ...
From Landstuhl there are as well direct regional trains to Kaiserslautern (K-Town), Mannheim and Heidelberg.
Ticket machine available at the station. Use it for the local trains (Kaiserslautern, Saarbrücken, Mannheim, Heidelberg)
For long-distance trains (Frankfurt, Munich, Berlin, ...) I recommend to buy your tickets online. Click the blue shopping cart (see box bellow), to find special prices. These tickets are e-tickets. Buy and print out at home. Very easy, very save.