Like I said in my earlier post IRCTC has certain rules which they follow regarding refund.You may have different purposes and reasons for getting refund but for each refund category they mentioned clear process and eligibility.
One of the common reasons of refund is when train is cancelled by IRCTC. In this case you will get full refund in your bank account but it could take little bit time to reflect due to heavy pressure all the time on IRCTC.
I have read their rules and got these information which can be summarize this way :
I- Ticket – You can cancel your ticket upto 72 hrs after the scheduled departure of train at any Computerized reservation counter.
E-Ticket – You can cancel your ticket online or TDR can be filed upto 72 hrs after the scheduled departure of train.
Note : IRCTC rare change their rules but it could be change at any time if they want to amend new rules.Therefore you can also visit their official website to recheck.