The phrase covers both a plan and a function. As a plan, a go-to-market strategy answers who the product is for, what it replaces, what it costs, how it is sold and which channels will carry it. As a function, "GTM" is shorthand for the teams that do that work together, usually marketing, sales and customer success.
The term became common in B2B software because those teams used to be measured separately. Marketing reported leads, sales reported deals, and the gap between the two was nobody's problem. Calling the whole thing go-to-market puts one number, revenue, over all of it.
A company can have more than one go-to-market at a time. A self-serve plan sold through search and a sales-led enterprise plan sold through outbound are two different motions with different buyers, and each needs its own plan.