This is the main website for buying Indian Railway tickets, but to register you must have an Indian phone number. If you don’t, it is possible to explain via e-mail that you are a tourist wishing to purchase tickets and don’t have a phone number. But a response may take, as it did for me, a week or more to arrive.
A quicker web option is to check out Clear Trip or Make My Trip. You can put in your date, destination and class preference and get the schedule of trains along with prices. But you might find, as I did, there are long wait lists for weeks ahead. Upwards of 20 million people ride on trains in India any given day, and tickets often must be booked weeks in advance.
That’s all to say that if you need to catch a train within days, and not weeks, the best option is to go to the railway station and buy your ticket there. Find the tourist bureau where you can take advantage of the tourist quota, and buy your ticket at the fairest price.
In New Delhi, we had to sit for nearly three hours in a room full of other foreigners waiting for their numbers to turn up in red on the screen at the front of the room. When it was our turn, we showed our passports and paid, and not five minutes later held our train tickets to Varanasi for the following day.
At Mumbai CST, the whole process only took about 15 minutes.
Sleeper Class (SL): This is the cheapest ticket you can buy. It is 6-berth, and bedding (sheets, pillows, blankets) is not distributed as it is in each of the other classes. There is no air conditioning (which, when I rode in sleeper was not as big a problem as the windows not closing completely in the cold night). There will be more people in these cars than there are beds, so you’ll probably find people sleeping on the floor when you get up to go to the bathroom in the middle of the night. And if you’re on the bottom bunk like I was, you might find some folks sitting at the edge of what you thought was your bed throughout the evening.
Third Class (3A): Like in SL third class it 6-berth, and you do receive bedding (which, really makes a difference). There is AC (and sealed windows), and sometimes there’s even soap in the bathroom. Someone comes around every so often and sweeps the floor and sprays the curtains with air freshener.
Second Class: In second class, there are fewer people and more privacy than in third. Each bed has curtains and it is 4-berth.
First Class: This is the most expensive class. It is a private compartment (that locks) with either two or four beds. I have read that it is also carpeted, and you get a towel along with your bedding.