This example game shows the typical development of a game on a 9 by 9 grid, illustrates the basic rules of go and explains how and why a game ends.
The flow of this game will be a lot clearer to you if you replay it move by move on a real go board, but just following the diagrams is fine as well (just more difficult to see).
Black starts the game in the upper right corner, and both players spread their moves out in all areas of the board. While this means their stones don't form one group, and are therefore less strong, it is an efficient way of playing.
Black's next move tries to separate the white stones. After 5, White realises that his stone at 2 has only 1 liberty left. This situation is called atari in Japanese. He adds another stone at 6, increasing the liberties of that group from 1 to 2, but Black keeps chasing with 7 and the white group has no escape route anymore.
White tries to capture a black stone before his own group is captured, but that defense also fails: when Black plays 2, he can remove the two marked white stones off the board.
Take a breather and check what the board looks like now. Black keeps the two captured stones separate: they are prisoners and will count as one point each at the end of the game.
White feels that the stone at the bottom is alone and vulnerable, so he plays some friendly stones to support it in the area. Black stops him from entering the corner with 2 and 4. After 4, White sees that the stone at 3 is in danger of meeting the same destiny as his stone on the left in the previous sequence, so he defends at 5. You can check for yourself that if Black cuts now at the marked spot, White could capture that stone before his own stones 3 and 5 are captured.
Black plays at 1 to control some more of the corner area, and White 2 also tries to control an area at the top. Then both push a bit against each other in the lower left.
Black tries to break some white groups apart with 1, but he counterattacks by putting a stone in atari with 2, and then capturing the first stone with 4. Check for yourself that the stone at 1 cannot escape. Black then tries another cut at 5, but has to run away with it to connect to another group. See also how White makes his group at the top stronger by chasing Black to the right.
White prevents Black pushing into the corner with 1. Black has also cooled off and plays at the boundaries as well. After Black 8, White sees that his three stones at the top would not be able to escape if Black cuts at 9, so he defends there himself.
Black 1 is atari on two stones, so White has to defend by capturing a black stone. Then Black 3 threatens to cut and capture at 4, and White defends again. Then Black thinks what to do next. He doesn't want to play in his own area on the right, because that will lose points at the end of the game. So he decides to try a daring attack where White is strong. White can easily trap the black stones though. Black 9 is clearly a mistake: Black doesn't even gain a liberty with this move!
Now White tries to capture something extra by cutting at 1. This time Black can easily trap his stones, and the attack comes to nothing.
White looks at the board and sees that there is nothing interesting left for him to do. If he plays in his own area, he will lose points (that is under Japanese scoring - under Chinese scoring he would not lose points, but would not gain anything either). If he plays in the area where Black is strong, his stones will quickly be captured. So he passes. Black feels the same way. So he also passes. This ends the game and both players can now count the game. Note that the marked stones don't have to be actually captured on the board. Stones that are 'dead' can be removed from the board after both players passed. This means that the players have got 4 prisoners each.
On the board, Black has 19 points (marked with a circle). Add to that 4 prisoners, and Black's total is 23 points. On the board, White has 13 points (marked with a square). Add to that 4 prisoners, and White's total is 17 points. Black wins the game by 6 points.
There are examples of counting the score for this game using several different types of Counting methods: