Initial Margin (Cost) is the minimum margin required to open a position. Once the position is opened, this is referred to as the Position Margin. It is calculated as:
Position Margin = Entry value/leverage + Unrealised PNL
The Maintenance Margin is the minimum amount of margin you must have on your position before the position is taken over by the liquidation engine. Unrealised losses are deducted from the Position Margin until only the Maintenance Margin remains.