Mostly petroleum gets transported across oceans in oil tankers before it gets refined to gasoline. There are also submarine oil pipelines, but those tend to be short an don’t generally cross an entire ocean.
Once refined into petroleum the stuff gets transported on land in a variety of ways including pipelines, trains trucks etc. Not all places where gasoline is consumed are easily reachable by land from a refinery, so some get gasoline shipped to them by ship or in extreme cases by plane.
Latest Answers