They put a lot of expensive equipment together, much of it made by other companies, and they make the entire chip for companies ordering them.
A list of fabs can be seen at: en.wikipedia.org/wiki/List_of_semiconductor_fabrication_plants and basically summarizes all the companies that have fabs.
AMD just gave up this risky part of the business amidst the fabless boom. Sound like a wise move. They then fell more and more away from the state of the art, and moved into more niche areas.
Video 1. SMIC, Explained by Asianometry (2021) Source.
One of the companies that has fabs, which buys machines from companies such as ASML and puts them together in so called "silicon fabs" to make the chips
As the quintessential fabless fab, there is on thing TSMC can never ever do: sell their own design! It must forever remain a fab-only company, that will never compete with its customers. This is highlighted e.g. at youtu.be/TRZqE6H-dww?t=936 from Video "How Nvidia Won Graphics Cards by Asianometry (2021)".
Video 1. How Taiwan Created TSMC by Asianometry (2020) Source. Some points:
  • UCM failed because it focused too much on the internal market, and was shielded from external competition, so it didn't become world leading
  • one of TSMC's great advances was the fabless business model approach.
  • they managed to do large technology transfers from the West to kickstart things off
  • one of their main victories was investing early in CMOS, before it became huge, and winning that market