It's very simple. "Pirates" use small arms and small boats.
The US navy uses helicopters and ship mounted canons.
Occasionally they double tap "drug smugglers" with missiles. Or sink inadequately armed "enemy" ships with a torpedo, followed by a second one after 19 minutes.
The difference is minor between piracy and war crimes: "δυνατὰ δὲ οἱ προύχοντες πράσσουσι καὶ οἱ ἀσθενεῖς ξυγχωροῦσιν"