Margin is a “good faith deposit” required by the broker so you can open and maintain a position. It is actually the minimum amount of cash required to have in your account at all times to cover any potential losses that may be incurred. Otherwise, Margin Call and perhaps Stop Out will be triggered.

As you know, in the financial markets, you can open positions greater than the amount you deposited. This is, of course, due to leverage. Hence, the Margin is closely related to the preferred leverage you choose.
It is expressed as a percentage.

For example, if you choose a leverage of 1:100, then the corresponding Margin required is 1%. Similarly, if the leverage is 1:50, then the required Margin would be 2%. I guess you get the idea.
4% is the Margin required for 1:25 leverage.
Leverage 1:100 1:50 1:25
Margin 1% 2% 4%

Let us take a look at the following example:
Say, that you deposited 10,000 euros in your trading account, and the preferred leverage is 1:100. Therefore, the Margin required by the broker is 1%. Now, if you decide to buy one lot of EURUSD, you will buy 100,000 units of EURUSD. The required Margin will be calculated as follows:
100,000 x 1/100 = 1,000 euros

Additionally, if an exchange rate of 1.1700 was used to place the above order, then the Margin required may also be calculated in the quote currency, in this case, the US Dollar, as shown below:
100,000 x 1.1700 X 1 /100 = $1,170