When it comes to margin, people who are not knowledgeable in trading usually think it's the difference between the buying and the selling price. While this is true for most other cases, in trading, margin means a collateral you've got to pay in order to open your position.
In the trading window on your terminal, you will see Margin and Free Margin sections, among others. Not all understand what it is, though. Let's see then.
Margin is an amount that represents a collateral to keep your positions open. In the trading platform, it is usually shown in the base account currency as a single figure, even if you have quite a few active positions. If you opened a long one-lot trade on EURUSD, you'll have the respective collateral amount in the Margin section. If your account currency is the dollar, and the EURUSD pair is now at 1.2000, your margin is 1.2000 x 100,000 (one lot) = $1,200. Your leverage is not shown here. (Don't worry, we'll cover it a bit later on). Once you've closed your position, you are getting your margin collateral back, adjusted on profit and loss. So, in case you got a $100 profit, you will get $1,300.
Your free margin is the amount you still can use as collateral to open new positions. Say, if you've got $10,000 on your account and opened a trade for $1,200, you still have $8,800 as your free margin. This is floating, however, as it depends on your active positions profits and losses. When your open positions are losing, your free margin will be down, and, conversely, with profiting positions, you will have more free margin. Many open a lot of positions at a time, using nearly all of their free margin. This may often lead to a margin call, and the positions being automatically closed.
Leverage is the amount of money your broker is willing to loan you for trading in the market. The leverage depends on the market you are operating in, as well as on the broker and the trader themselves. In the stock market, you can have 1:1 or 2:1 leverage or more, but very rarely can it be over 20:1. In Forex, however, a 500:1 or even 1000:1 leverage is not something beyond understanding. But wait, what do these figures actually mean, you may ask. Well, let's see.
Leverage is a very important vehicle for most retail traders. Few are those who can open a few-thousand-dollar account; with leverage, however, you'll be able to operate large amounts even with a few hundreds of bucks. Whether this is good or bad, is disputable. With such a tool, a trader gains an opportunity to actually trade the markets, but there's a downside: with leverage, the potential loss is magnified, too. So, you've got to be sensible when trading with leverage.
The most popular leverage on FX out there is 100:1. This means, you can operate with $100,000 having just $1,000 on your account. Thus, the number of instruments you can trade increases drastically. On the other hand, you can't lose money that is not yours, so once you've reached your limit (that is determined by every broker individually), your positions will be closed automatically, because the broker will want their money back.