When dealing with an unlocked or locked phone, the question is whether or not the device can operate on a specific wireless network that is different from the one the phone was designed for.
An unlocked smartphone is a phone that can work with any mobile carrier. Some phones are not unlocked and can only be used with one carrier such as Verizon, or only with AT&T, or T-Mobile, etc. An unlocked phone does not have that limitation.
However, a phone’s compatibility with a network is only relevant for mobile carriers, not for wireless networks like Wi-Fi. Any phone can connect to a Wi-Fi network as long as the Wi-Fi is working, regardless of whether the phone is unlocked or locked.
Most cell phones and smartphones are tied to, or locked to, a particular wireless carrier, such as Verizon, T-Mobile, AT&T, or Sprint. Even if you don’t actually buy the phone from the carrier, the phone is still tied to a carrier. For example, you can buy an iPhone from Best Buy, but you may still be required to sign up for service from AT&T or your respective carrier.