When trading the financial markets, your expectation should be that the person or institution on the other side of the trade will make good if the trade goes your way.
Credit risk is the risk where one party to a trade is unable to pay the other party. This could be because one party defaults or goes into bankruptcy. The goal of credit risk management is to mitigate these risks though proper credit risk exposure.
When you are trading you should be aware of the rules and regulations that the forex broker abides by. It is of the utmost importance that a forex broker is regulated appropriately in the country that they do business in and maintain the proper reserves in case the other party associated to the trade cannot cover their trading loses.