Neural networks do not directly take actions in games. Instead, some code needs to supply the current state of the game to the neural network, interpret its output and take the action. Typically yet more code that is separate and considered part of the environment will process the action and update the game's state, allowing the cycle to repeat with new values.
Adversarial networks, although the name suggests might be suitable for representing opponents in a game, are not normally used for this. Instead these are more tightly bound to each other and typically used to create a kind of curriculum learning starting from simple solutions and getting more sophisticated. The image generating GANs are typical examples.
Game playing with two opponents is a variation of sequential decision making problems. These have a long history of study in AI, and there are a few different ways to approach solutions.
A lot of modern techniques that apply neural networks to make game agents are based around reinforcement learning. A good introduction to the subject as a whole is Reinforcement Learning: An Introduction (link has an official free download PDF made by the authors).
It would take some time to read that book, so if you are feeling more like jumping straight in with some code examples and implementations that use neural networks, then there are lots of tutorials and example applications for agents playing various board games. Search for e.g. "reinforcement learning connect 4" to get example grid-based games that will be very similar to solve as yours.
You don't have to use neural networks or reinforcement learning. For a game as simple as yours, it is possible to write agents purely on game tree search techniques. A popular approach would be negamax with alpha-beta pruning and the Wikipedia article in the link includes full pseudocode implementation.
You can also combine search and reinforcement learning, and this is a popular technique as it speeds training for RL and makes early steps of game play with search more efficient (because the neural networks can calculate best decisions learned from starting states without needing to search as deeply)