The Ottomans almost captured Vienna, but king of Poland John III Sobieski led a Christian alliance that defeated them in the Battle of Vienna which shook the Ottoman Empire's hegemony in south-eastern Europe.
On the smaller Polish front, after the battles of 1683 (Vienna and Parkany), Sobieski, after his proposal for the League to start a major coordinated offensive, undertook a rather unsuccessful offensive in Moldavia in 1686, with the Ottomans refusing a major engagement and harassing the army.
For the next four years Poland would blockade the key fortress at Kamenets, and Ottoman Tatars would raid the borderlands.
The League won the war in 1699 and forced the Ottoman Empire to sign the Treaty of Karlowitz.
The Ottomans lost much of their European possessions, with Podolia (including Kamenets) returned to Poland with imposition of Austria.