Tickets are issued like this.. certain number of CNF tickets and then some RAC and then WL.
#
e.g say 12860 has CSTM-HWH - 400 berths in SL
100 in RAC
and then WL
#...
more...
Say you get WL 56. Now when 56 passengers above you cancel the tickets, You become the last number of RAC. Similarly it moves to CNF when required number of passengers above you cancel their tickets.
#
Note that not always there is RAC. At times the status is WL after CNF tickets. Some classes like 1AC and all seating classes have no RAC. Some quotas also do not have RAC.