Hi! understanding leverage and position sizing is (I belive) one of the most importent things to understand! Andwhen you get your head around it it is actually really simple 
Basically, Leverage only means how many trades/positions/units you can have on at any given time, and if you stay within 2% risk, you probably will never notice it(I dont), except if you open up a lot of trades.
Leverega does not come into play when you place a trade at all(except when you have a LOT of trades placed).
So the next step is Risk and position size, basically, to be able to know your risk and calculate anything, you have to know your Stop Loss.
So for example you have a 25pip SL, a 500$ USD account, trades only USD based currencies, and risks 2%.
2% of 500$ is 10$.
remember, 25pips equals to 0.0025$, so if you bought 1 unit, and it hit your stop loss, you would loos 0.25 cents. so basically to get your unit size, you just divide your risk, 10$with your stop loss, 0.0025, that turns into 4000 units.
If you buy 4000units of for example EURUSD, and it moves against you and hit your stop loss, you would loose 4000 * 0.0025 = 10$.
Hope you understood that, it actually is really simple(it gets harder if you trade for example AUD/CAD or something different from /USD but you can just use babypips position size calculator to fix that…
anyway, here is the equation:
Units = Risk / StopLoss
10 / 0.0025 = 4000
And as always, most trading software requires you write units as Lots, and 1 (Standard) Lot is 100 000units.
4000 / 100 000 = 0.04 Lots
Good Luck!