The objective of the game is to get 4 of your pieces in a row before your opponent. But now X must deal with the same situation. O is about to get a vertical Connect-4 in column 5. If X is to keep O from winning the game, he should also go into column 5. And so on.
Situations can arise where the entire board is filled and nobody has won yet.
Now that you're familiar with the game, let's get you familiar with the data structure you'll need for the board. Arrays are simply matrices. They are static data structures which can have any number of dimensions and any size in any direction, but after the array is created, it cannot be resized. You will need to declare your array in the instance variable section of your class so all of the class's methods can access it. Use a constant to specify the maximum elements.