IP databases. Looks at where your device is connecting from to (mostly correctly) guess your location.