Entire books have been written on this subject, but I will try to keep things brief.
As a general matter, Confederate supporters--particularly the economic and political elite--were not held responsible in any significant way for their actions post-Civil War. No treason trials were held and President Andrew Johnson pardoned many Confederates. As we will see, the fact that Confederate officials were generally not held accountable for their actions meant that after the federal government abandoned Reconstruction, a renewed era of racist oppression in the South came to be.
For a brief period in Reconstruction (the so called Radical Reconstruction), Radical Republicans in Congress did impose fairly harsh measures on former Confederates, including provisions in the Reconstruction Acts that forbade Confederate politicians from voting. SOme were imprisoned for brief periods of time (but never formally charged or convicted). They did this over the opposition and vetoes of President Andrew Johnson, who supported rapid reintegration of the South into the Union without serious reform or punitive measures. In addition, the 14th Amendment forbade former Confederate officeholders from holding political office, which did prevent some Confederates from being seated in the Senate or House despite being elected. For example, Zebulon Vance, governor of North Carolina during the Civil War, was elected to the Senate in 1870, but was not seated thanks to this prohibition. The military presence of federal troops helped to enforce these restrictions.
In addition, the Reconstruction Amendments give Black men the right to vote, a right which they exercised to great effect for a period of time. (It is easy to forget, but for a brief period in Reconstruction, Black voters exercised enormous political power, electing numerous representatives and even getting a couple Senators seated from the Deep South. After all, in some states (especially in the Deep South) Black people were a majority of the population!) But white supremacists were violently opposed to Black suffrage--so long as Blacks in the South had political power, the white supremacist vision of former Confederates could not be fully realized. The Ku Klux Klan operated a campaign of racial terror from the end of the Civil War to 1872, when the federal government, under the leadership of President Grant, effectively wiped it out thanks to Radical Republican laws empowering him to do so.
But it wasn't enough. The so-called "Redeemers," a coalition of Southern elites opposed to Reconstruction, arose in the 1870s, who created and ran paramilitary organizations that terrorized Black and Republican voters. These organizations operated almost entirely in the open, in contrast to the more secretive Klan. The Redeemers hated Reconstruction not just for ending slavery, but also because Reconstruction saw Northern business interests entering an economy these elites had once controlled. Many of them were former Confederates or relatives of former Confederates.
Radical Reconstruction did not last long in the face of these pressures. With help from fatigue in the North and the replacement of Radical Republicans with more moderate voices, Redeemers successfully pushed back Reconstruction and retook control of Southern state governments. By 1877 only three states still had federal troops in them--Louisiana, Florida, and South Carolina. The election of 1876 was hotly disputed between the Democrat Samuel Tilden and Republican Rutherford B. Hayes. As part of the "Compromise of 1877," Republicans agreed to withdraw these last troops from the South in exchange for Hayes winning the election. This marks the formal end of the Reconstruction Era.
It did not take long for the Southern elites, including many former Confederates, to complete their white supremacist project. Zebulon Vance, the former Governor of North Carolina, was elected to the Senate again in 1879 and this time was allowed to be seated, regardless of the 14th Amendment--showing how the country had almost given up on holding Confederates accountable. Across the South, Democrats took control of state legislatures, disenfranchised blacks through grandfather clauses and literacy tests, and enacted Jim Crow laws; by 1900, the project was complete.
The failure to hold Confederate officials accountable is one major reason why Reconstruction failed. It is hard to talk about counterfactuals in history--we cannot run experiments on the past--but the ability of former Confederates to mostly go free allowed them to organize against Reconstruction. For example, Wade Hampton III, a former Confederate officer, not only went on to become Governor of South Carolina in 1877, he led the Red Shirts, a paramilitary Redeemer organization. More deeply, the failure to reorganize the Southern sociopolitical system during Reconstruction meant that the same class of people who led the Confederacy--elite white planters, businessmen, and politicians--still had the power after the War to violently end Reconstruction and reassert their dominance. It was not just about Confederates themselves--it was about the system they were a part of that was allowed to survive more or less intact.
Sources:
Vann Woodward, the Strange Career of Jim Crow (1955).
William Link, North Carolina: Change and Tradition in a Southern State
Paul Escott, Many Excellent People: Power and Privilege in North Carolina, 1850-1900