Patents are granted in individual countries and are only enforceable, per se, in the granting countries. Thus a U.S. patent gives no rights outside of the U.S. But note ...
A U.S. patent holder can block importation and sale of an infringing machine, manufacture or composition of matter in the U.S. and can sue for damages. Suit can be brought against foreign companies in U.S. federal court, so long as the patent holder can serve the infringer.
Furthermore, if the infringer sells the infringing product to a third-party, and the third-party, directly or through a distribution chain, imports and/or sells the infringing product in the U.S., then the infringer, the third-party and the entire distribution chain may be liable for direct (importers and sellers) or indirect infringement (the source of the product and portions of the distribution chain not involved in importing or selling the product).
Services provided via the Internet utilizing a patented process are a special case, where there is no literal importation, but there could be sales or offers to sell in the U.S. A suit in U.S. federal court is possible in such a case.
If you have the money, and particular foreign markets are of interest to you, you can file patent applications in individual countries of interest. Foreign applications can be filed directly with individual countries, or initially via a PCT (WIPO) patent application, followed by instructions to enter national stage in countries of interest. Both paths have their advantages.
But make note, this process can get extremely expensive and litigating in foreign countries is even more expensive. This typically only makes sense for large, well funded companies with large foreign markets.