Today, 07:00 PM
There is nothing wrong with "refusing to trade with somebody." But that is NOT what sanctions are.
Sanctions occur when someone (e.g., the US government) forcibly prevents someone else (e.g., US citizens) from trading with somebody (e.g., North Koreans).
In the particular examples just provided (US gov., US citizens, North Koreans), this may not be an "act of war" (except metaphorically, against US citizens), but if you replace "US citizens" with "citizens of some other country," then forcible "3rd party" interference in such trade very much qualifies as an "act of war" if either of the would-have-been-trading countries deems it such.
Sanctions can also involve things like the forcible seizure or "freezing" of another country's assets (as the US sanctions against Iran did). It should not be at all difficult to imagine why this can be considered an "act of war."
EDIT: I didn't see PG's reply before I wrote mine. He stated it better than I did (especially concerning "sanctioning" one's own citizenry):