There were many ways that this happened (I am assuming you are talking about the time after Reconstruction when blacks had the official right to vote but were still not allowed to do so). Some examples:
- Poll taxes -- the practice of charging people a tax to vote. Since blacks were poorer on average than whites, this affected them more.
- Literacy tests -- laws were passed requiring blacks to prove they could read in order to be able to vote. Many poor blacks were illiterate.
- Understanding tests -- these are like the literacy tests. But here blacks had to show that they understood passages that they were required to read. Both this and literacy tests could be made as hard as they wanted to by white supremacist election officials.
- White primaries -- in the South, only the Democratic Party could ever hope to win an election. The Democratic Parties of many Southern states made their primary elections white-only. They said this was legal because the Party was a private organization and could hold elections however it wanted.
These were the main ways of preventing blacks from voting.