You can play online using the built-in multiplayer, when the game supports it. Other than that, you can also use various services like Hamachi or Garena. These services require a username and password for the login process which can be created on the main websites.