According to SEBI mandate, any excess(unutilized) funds in the client's account, have to be transferred back to their bank account atleast once in a quarter. SEBI came up with this so as to ensure that the brokers do not misuse the clients' idle funds. However the broker need not refund the funds under certain cases. When,

1) If the balance is in debit, after blocking 2.25 times of the margin levied for an open position held by the client

Let us understand the 1st point with an example.

Consider you have Rs.1,50,000 as your trading account fund balance and you have 4 lots of Nifty. Margin required for 1 lot is Rs.25000. Thus for 4 lots the blocked margin would be Rs.1,00,000. Now according to the exchange, the broker can block 2.25 times of the margin i.e. (100000x2.25), which equals Rs.2,25,000.

The funds available in your trading account are only Rs.1,50,000, thus the broker does not have to provide any refund and can mark your account as retained. The broker will have to send the explanation of such retention in a statement, which is called as the Retention statement.

In case, you had Rs.3,00,000 as your trading account fund balance, the broker would have to refund you with Rs.75,000 i.e. (3,00,000-2,25,000).

The format of the Retention statement is specified by the exchange. You can know more about it here.