You want to open a position on AstraZeneca. With IG, you will be margined on the total consideration of the trade.
If the stock is margined at 20%, shares are valued at £45 and you want to trade 500 shares, your margin will be £4500. This is because margin is calculated as
Number of shares x share price x margin percentage
So 500 shares x £45 per share x 20% = 4500
Therefore, when trading on leverage, in order to obtain an exposure equal to 500 shares in AstraZeneca, you only need to hold a deposit of £4500 instead of buying £22,500 worth of shares in the underlying market.