France and Britain are fighting a war. Since the US wants to keep being neutral, they don't help or favor one Sid over the other. They continue to trade with both sides, which angers both nations(France and Britain)
The British started to ambush American ships and impress the American sailors(taking them hostage and forcing them to work for the British. The Americans started to get upset since the British was treating them as a weak nation and is harming their trade.
HA! YOUR SHIP IS OURS AND YOU WORK FOR US NOW!
The US released the Embargo Act, which bans trade with between US and any foreign nation, in order to stop the British from impressing American sailors and to punish France and Britain. This hurt the economy a lot and angered many Americans, so the Non-Intercourse Act was released, which allows trade between the US and any foreign nation except for France and Britain, to fix the damage caused by the Embargo act. This still angered people since it didn't affect Britain or France in any way, and Britain was one of America's biggest trading partners so America's economy was still taking damage.
NO TRADE WITH ANY FOREIGN NATION!!!
Nevermind, NO TRADE WITH FRANCE OR BRITAIN(everyone else is fine though =) )