The Compromise of 1877 was an unwritten agreement after the American Civil War between leaders of the Democrats, who mostly ruled the South, and the Republicans, who mostly ruled the North. The Democrats agreed to settle the Presidential election of 1876 by allowing Rutherford B. Hayes to become President and not their own candidate, Samuel J. Tilden.
The Republicans promised to remove the Army from the occupied territory of the South, thus ending the Reconstruction era. The Democrats promised they would maintain African American rights.
The government stopped trying to fix Southern society and stopped helping the African Americans and Republicans there. Additional details are unclear, because it was an unwritten agreement.