There are a number of things ISP's do:
- drag bundles of fibers across continents. Since this is very costly, only a small number of very large companies do this and many ISP's rent fiber-pairs from these companies
- rent capacity (a wavelength, VLAN, MPLS circuit, etc) between to an IXP from a company who owns (or rents) fibers. Since the capacity of fibers is shared, this usually is less costly
- buy IP transit from a transit provider. These transit providers typically have their own global connectivity. Transit providers can offer ISP's routes to the entire internet, so an ISP does not have to be present on every IXP to connect to every other ISP on the planet.
The last option is most common. There is only a limited number of transit providers who don't buy transit from another ISP, they're usually called Tier 1. Most ISP's combine IXP connectivity and IP transit for their global connectivity.
Edit:
Here's a real-world example: I used NLNOG Ring's ring-trace
to create a graph of how networks around the world reach Facebook's network.
.
As you can see from this example, a lot of networks reach Facebook via DE-CIX (the IXP in Frankfurt, Germany, one of the largest in the world), but there are also a large number of networks which use Telia (AS1299) and NTT (AS2914) to reach Facebook. Telia and NTT are tier 1 transit providers.
Edit 2:
Since the image is downscaled it's hard to read. here is a full size version.