David and Absalom prepaired to go to war against each other, David as we know was an extremely experienced and war tested military leader, Absalom was not. They went out to battle and Absalom lost in a terrible way, he tried to wage war against the man after God's own heart and by implication God Himself and failed totally. As he fled the battle on a donkey Absalom was caught in the branches of a tree in the forest nearby and hung their helpless, until one of Davids men found and returned to Joab to tell him he had found Absalom, Joab went straight there and piereced him through, despite David's command to leave Absalom alone, Joab knew that David would not punish Absalom even for all he had done and so disobeyed a direct order. Messengers came to David with knews of the war but David was only concerned with whether Absalom was alive or not and when he found out that he was slain he mourned deeply.