pizzadequeso GMS and GOS both use GNSS (GPS + other sats) to derive location. The phone has hardware that can receive satnav signals, and both GOS and GMS are capable of interfacing with it.
Similarly, both GOS and GMS can scan nearby APs and use a lookup database to infer location based on those APs having been previously geomapped. When an app tries to use the GMS location API, GOS steps in and grabs that request, returning the same result as GMS would without the app's being any wiser (assuming you have it sent to reroute location). The purpose is just to keep Google from getting access to your location when using a non-Google app. Say I'm going for a run with Strava. I know that Strava is going to hoover up that location information and probably sell it to the highest bidder and whatever else, but there's no need to Google to also have that information.
If WiFi is enabled you do not need to turn on scanning to use network location. If WiFi is disabled, then it won't work unless you turn on WiFi scanning, which enables the OS to scan nearby APs even when WiFi is otherwise off (this is how stock Android and iOS work). GOS offers the option (by default) to use their proxy to Apple's AP database, so neither Apple nor Google can associate that query with you specifically.