There are 2 different ways:
Games with live action use a server-side program to interpret data and send it back out to any connected users. MMO games are a good example of this. It is very complex and to do it with AppGameKit would require a server which can run a Windows exe program. I've no idea where to even begin with that stuff. There are some example of using the AppGameKit multiplayer commands in the documentation.
Games that are turn based can do it a different way. You send data from the game to the server then store it in a database until the other players can pick up that data. Some games utilize push notifications to send the data from the server to the other players, but this is unstable and subject to failure. Also, AppGameKit doesn't have a built-in way to read data from push notifications. The other method is to send a push notification that tells the user they should open the app. When the app is opened you check the server for any relevant data for that user and get it. This is the method Wordspionage uses. It is complex and takes a bit of work, but AppGameKit does it pretty well.
Whichever the scenario, the data must pass through an intermediary such as a server where it is stored. You can also share data via NFC, but I've not tried that on AGK.