Indian Railways allows advance reservation typically up to 90 days in advance of the travel date. If you book early, there is a good chance of getting a confirmed berth. The coach and berth numbers will be indicated on the ticket itself. If confirmed berth is not available, you will get a ticket with RAC or WL status.
RAC stands for Reservation Against Cancellation, and it means that you don’t have a reserved berth, but you have sitting accommodation in the train and class of your choice. There is a possibility this will be converted to a berth when it becomes available due to last minute cancellations closer to travel date. RAC ticket holders can board the train and are seated in the two side chairs. If a berth is available due to cancellation, then one RAC holder will get the berth, and the other RAC holder can convert the two side chairs into a berth.
Tickets with WL or Wait List status are not guaranteed any berth or sitting accommodation. They will be accommodated only if sufficient confirmed or RAC ticket holders cancel their reservation. The number of WL tickets are determined by railway officials, and once a maximum number of wait listed tickets have reached, the ticketing system refuses any more requests and responds with REGRET status. You cannot purchase a ticket with REGRET status.
The RAC/WL tickets will have two numbers – WL20/W15, WL12/RAC10 etc. The first number shows the ticket status when you first purchased it, and the second number shows the current position. So WL20/W15 means that when you purchased the ticket you were on wait list 20, and there were 5 cancellations and so your current wait list status has improved to 15.
You can check if your RAC/WL status has improved by using the 10-digit PNR number on the top left corner of the Indian Railways ticket. You can check this online easily by visiting PNR Status or the Indian Railways website.