Suppose that white has just captured a black stone by placing the marked stone below.
Black cannot immediately recapture with a move at D4 (the star point) because of the ko rule.
Black must play somewhere else on the board. Suppose black plays at F3, extending their weak stone. White now has a choice. White can play elsewhere on the board, or they can play at D4 ending the "ko fight."
Here white has ended the ko. White is left with an inefficient clump of stones, but they have lots of liberties and are not in immediate danger.
Here’s a more complicated example of a ko. As before, white has just taken the stone at D4 to start the ko. This time black has a better move, the marked stone at G3. This kind of move is called a "ko threat." It threatens to take something more valuable than the ko, forcing your opponent to respond away from the ko and allowing you to retake the ko.
In this case black is threatening the four white stones. White has to choose between saving the four white stones and ending the ko. If white saves the four stones, then black can re-take the ko with a stone at D4.
Now it’s white’s turn to look for a ko threat somewhere else on the board. If they can force black to respond elsewhere, then white can re-take the ko. If they can’t find a ko threat, then black can play at D3 ending the ko. This process of taking turns looking for ko threats and retaking the ko is called a ko fight. It is a natural consequence of the ko rule.