+ 1
This is a very broad question. đ
It depends on the language(s) used, and the type of game it is! Games that are popular multiplayers, such as Call of Duty, CS:GO, Team Fortress 2, Overwatch, etc have dedicated servers that players play on.
Creating an in-depth multiplayer video game is no easy task, therefore, the explanation is no easy task. Think of a multiplayer game as a barrage of servers that players connect to, and share connections with other users, and that is how they play together!