Yes, a VPN changes your IP address, which is how most games will determine your location. If you want to play a game that's only available in Japan, for example, just connect to a VPN server in Japan. Likewise, many online games segregate players by region, forcing them onto region-specific servers. A VPN can get you onto servers from any region where it operates servers. Bear in mind that you might also require a local payment method and a local game account.