Saul keeps chasing after David, but he eventually has to stop and go to the bathroom because even crazy kings have to pee.
He goes into a cave to relieve himself and unfortunately for Saul, David and his men just happen to be in the innermost part of the cave.
David's men believe that God is giving David an opportunity to kill Saul, but instead of killing him, he just cuts off a corner of his cloak. Which, hey reminds us of 1 Samuel 15:27-28. In those verses, Saul tore off a piece of Samuel's robe to which Samuel told him that the kingdom would be torn away from him and given to someone else.
David has a chance to take the kingdom on this day, but he chooses to let Saul live and leave the cave (1-7).
David follows Saul outside and shows him the part of the cloak he cut off. He tells Saul he could have taken his life, but spared him instead.
Basically, David is trying to tell Saul that he isn't a threat to the anointed king.
Saul goes off on his own, relieved not to be dead. Do you think that Saul will have a change of heart and stop hunting David? Yeah, we don't think so either. And we're usually right (8-22).