For example suppose you're Acme Widgets, and you want to build a web app, mobile app, analytics, a data lake, real-time stream processing, and all the continuous delivery tooling to go with this.
You can hire ThoughtWorks to provide the team to build all this and also teach your own people how to do it. The pay is essentially the same as you'd pay hiring your own employees for the project, i.e. time and materials.
The advantage of hiring ThoughtWorks is when you want a team of people who all know how to work together, and you want the team for a specific project goal.
An example that may be useful for the Hacker News readers: suppose you work for a San Francisco startup, and you want to ship a product fast, and do validated learning something like the Lean Startup book, or Steve Blank's Business Model Canvas. You can have your own employees building the core product, and you can hire a ThoughtWorks team to build your client apps, continuous delivery pipelines, analytics dashboards, and the like.