question about margin?

Hello, I am new to trading
my question is that broker give margin on stock so what is this? and how to use this

this what I understand plz correct if I wrong

for example, I have margin/ free cash of Rs 1000 in my account and I want to buy the stock of ABC co. which price is 500 per share
and broker provide the margin of 5x on it.
So I can buy up to 5000 (1000x5) is it correct?
then how much I need to pay to broker in case of profit and loss?

plz explain thanks

Check this one. it’s already covered in one of the threads.

Keep it simple. Ur initial 1000 rupees is just a token blocked amount. Broker will give that to u any case. Now if u end in profit u will get additional amount equivalent to profit.

If loss say 4000 broker will debit 3000 ( he will adjust against ur token amount of 1000)