Star Trek VI: The Undiscovered Country ends with the Federation and the Klingons signing the Khitomer Accords, thus leading into a new era of peace and cooperation between the two states. But TNG "Yesterday's Enterprise" earlier established that only 20+ years before the TNG era, relations between the Federation and the Empire were still pretty rocky and tenuous, with ties only really strengthening due to the sacrifice of the Enterprise-C in defending the Klingon colony from Romulan aggression. So how did they get from A to B, so to speak?
Actually, Star Trek VI
doesn't show the signing of the accords. It does show the Khitomer Peace Conference, however.
As far as how they got from A to B, Bry_Sinclair is right. I would also point out that Star Trek VI
itself suggests that the road to true peace will be a rocky one in that the conspiracy was so wide-reaching that it had members from Starfleet, the Klingons, and the Romulans. This suggests that there was a significant minority (possibly even a majority) against peace. The unveiling of the conspiracy would only calm things for a while and silence detractors temporarily. There would almost certainly still be people in high positions on both sides just waiting for opportunities to weaken or end the peace not to mention the Romulans who would do their best to wreck the peace as well.