Swap
A forex swap rate is defined as an overnight or rollover interest (that is earned or paid) for holding positions overnight in foreign exchange trading. A swap charge is determined based on the interest rates of the countries involved in each currency pair and whether the position is short or long. In any one currency pair, the interest is paid on the currency sold and received on the currency bought.
Spread
The difference between the Ask price and Bid price is broker’s profit that is called spread.
The cost of trading is the overall expense that a trader has to incur to run their trading business.
There are optional costs for some specific services that a trader may wish to purchase to improve their trading performance, such as EA (Expert advisor for automated trading), news feed, custom indicators, technical strategies, and VPS (Virtual private server, to run EAs, eliminate connectivity failures, and system downtimes).
But the most important fact is that there are also some compulsory costs that every trader has to pay to trade—generally speaking, for every trade that a trader places, they will have to pay a certain amount in costs to the broker. Usually, these costs are the commission fees, swaps, and the spread charged by the broker for every order placed.

Taking these costs into consideration is crucial to succeeding in the FX market as a trader.
Many traders ignore trading costs and, therefore, underestimate the challenges to generate a steady long-term profit.
Failure to succeed and generate profit in the FX market for many traders is not necessarily down to not trading well. Most of the time is due to under-estimation and mismanagement of the costs involved that can lead to failure, when in fact, the trading results should, in theory, lead to success.