How police track users on the internet?
It all comes to the IP address which is provided to you by your Internet Service Provider (ISP). The company you’re connecting to the Internet has a limited number of IP addresses so it’s relatively easy for the authorities to know which ISP or mobile operator you’re using to “get online.”
From there, all they need is a court order to reveal the other details, such as where that IP address has been assigned to — to which user — and they can pinpoint to you.
The situation is similar when you’re accessing the Internet from your smartphone — the authorities get a court order to obtain information about the user and his/her whereabouts from the carrier.