In the above situations they will use a network that encrypts the packets before they are transferred over the network. This solution is called VPN.
VPN stands for a virtual private network. It provides a secure, encrypted tunnel to transmit data. It is the most secure way to connect to the internet.