How does margin trading work in the Indian stock market?

How does margin trading operate in the Indian stock market and what are the risks?,