This is a very interesting question. In my answer, I will focus on the time between World War II and the 1970s.
Many African American men decided to join the United States Army during World War II. This allowed them to show that they were just as patriotic as their white counterparts. It also allowed some black Americans to achieve success in a career, which they might not have had otherwise. Dorie Miller, for example, became the first black American war hero. However, this did not lead to equal treatment, as there was no full equality in the army: until 1948, soldiers were separated into white and black units. Even afterwards, the treatment of black soldiers was often very different to the treatment of white soldiers.
In the time between the end of the war and the 1970s, there were many attempts of African Americans to highlight their desire for equality. Individually, they might not have made much difference, but collectively, they managed to raise awareness to their cause and inspired others to follow their example.
For example, boycotts were used as a method to fight for equality—most famously after the Rosa Parks incident. Rosa Parks had been asked to give up her seat for a white passenger on a public bus. When she refused to do so, she got arrested. As a result, African Americans started to boycott the bus company.
Another method of trying to gain equality was to try and take matters to court. The Brown v. Board of Education verdict, for example, led to an end to segregation in education. However, as there was a lot of resistance to this ruling, its success was initially only limited in some areas.
Peaceful resistance was often used as another method, for example sit-ins. The Greensboro sit-ins became very famous. Inspired by the events in Greensboro, students of other universities also soon started sit-ins in order to protest against segregation. Martin Luther King’s Selma to Montgomery March in 1965 is another example of peaceful resistance, which attracted huge attention and media coverage, thus lending more power to the African American fight for equality.