Suppose I bought a stock through normal margin,my stock is in a heavy loss,Can I keep it? How long can I keep my stock?

If you have bought a stock on margin then you will have to square off the position the same day (at least with Zerodha).