By 1790, Poland was so weak that it had Prussia, with whom it didn’t really get along. A new constitution was created for Poland in an attempt to strengthen the nation. It introduced greater political equality between nobility and commoners and placed peasants under the government’s authority.
The new system set up by the Poles was very similar to the United States Constitution, interestingly, although this is probably a case of using similar sources. Poland was made into a monarchic republic where the objections of a single delegate couldn’t the Sejm, and the government was divided into executive, legislative, and judiciary branches.
Poland’s neighbors naturally disliked this for many reasons. For one, Poland’s neighbors were (mostly absolute) monarchies who feared republican influence. Prussia broke their new alliance with Poland over the Constitution, and Russia was annoyed, likely at the loss of influence. Even Poles disliked the Constitution - they formed the Targowica Confederation with Catherine’s support.
War broke out in 1792. Even if Poland had been a mostly functioning and united nation, it’s unlikely that it could defeat both Prussia and Russia. And Poland wasn’t united and, indeed, had a history of division. The fact that Prussia broke its alliance with Poland after war was declared only created more confusion. The war didn’t even last a single summer.
Part of the reason that Russia had to agree to a partition was due to other events in Europe. Prussia had recently been defeated at Valmy in France, and they wanted compensation in exchange for backing out of the First Coalition. Russia accepted this deal, despite its nature as blackmail.
The Second Partition was approved by the Grodno Sejm, which was the last sejm Poland ever had. It was also infamous for accepting bribes. Russia annexed lands that were mostly legally Lithuanian and used to belong to the Kievan Rus, such as Minsk and Kiev. Prussia gained Polish land, including Danzig.
After the Second Partition, Poland was effectively a Russian puppet state, bereft of any glory that it might have had. The members of the Targowica Confederation and the king both lost a lot of prestige for this, as they weren’t expecting another partition. Lack of popularity for the status quo soon grew.
The success of the French Revolution did nothing to quell this - indeed, it encouraged it. The people of Poland quickly turned against Prussia and Russia. On March 24, 1794, a man named Tadeusz Kościuszko seized control of the military and led them against the occupiers. Neither Catherine nor the Prussian King, Frederick William II, liked this, and they were quick to respond, crushing the revolt, but not before they won a few victories.
Representatives from Austria (which didn’t want to be left out of the Third Partition like they were excluded from the Second), Russia, and Prussia met to discuss the end of Poland-Lithuania. On January 26, 1797, they signed a treaty to finally finish partitioning Poland. Austria got Western Galicia and Southern Masovia. Prussia got the rest of Masovia, Podlachia, and Warsaw (not that they managed to keep it). Russia got everything else.
However, the representatives were feeling vindictive. They didn’t bother legalising their actions with a Polish representative, and the King of Poland was made to abdicate and live as Catherine’s prisoner in St. Petersburg. However, even that wasn’t enough - the representatives attempted to erase Poland’s very name from history. That didn’t turn out very well in the long run, though.