Margin is the amount of money you need to open a position, and leverage is a multiple of that margin. Simply put, you use margin to create leverage. While these terms are often used interchangeably, they are actually different.
The assets you hold such as stocks, bonds and foreign exchange, as well as open positions, are taken into account when calculating margin. Brokers will treat margin as collateral to cover the credit risk posed by the holder to the exchange. Margin can also be said to give them the confidence to allow you to trade with leverage, as it can be used to cover trading losses on your account. For specific information about margin, check the exchange's broker terms and conditions.