Basically you need a sever and 1 or more clients.
Server and clients are sockets. These sockets are not objects, they are application instances, for example, 2 windows of a same program are 2 instances of a same program, they can be in the same device or in different devices and they can communicate locally or in a network. GM does this through the async networking event, which at first is a bit dificult to master, all you need to do to get it right is keep track of all of the information through debug messages and stuff and litle by litle you will finally know how everything works
GameMakerStation has a networking tutorial in youtube, that one is one of the best (despite some errors)