There are a few things going on. One is that police can choose what crimes to enforce, and city police tend to enforce crimes committed by lower income people. For example lower income people are more likely to be street level drug dealers, other crimes are more likely to be committed by higher income people.
Then in looking for dealers, police go to lower income neighborhoods. If you look for something you will end up finding it, if you don't look you won't find it. This leads to things like pretext traffic stops, where someone is stopped for a minor violation that wouldn't normally get someone stopped. The police can then detect something else, like the smell of drugs or drug paraphernalia in the car, which they use as cause to search the car. In searching the car they find something that can lead to criminal charges.
This leads to lower income people receiving fines for minor traffic violations, and minor drug violations, at a higher rate the higher income people. The same lower income people struggle to pay those fines more, which puts them in a worse place, possibly leading to more desperate crimes.
Policing is punitive, and doesn't help solve underlying problems. Imprisoning and fining poor people doesn't help them or society.
I don't think this is as much of a racial issue as people make it out to be, it just happens that in the US the low income urban housing projects are predominantly non-white. Low income people in rural areas are less likely to be over policed because there are physically less police per squeal mile in rural areas. And with less people in rural areas, things are more likely to go unnoticed.
If you look at somewhere like the UK, where low income urban council estates (housing projects) are often predominantly white, you see the same over policing, profiling, and pretext stops. But instead of profiling young black males in hoodies driving around a lower income neighborhood, they profile young white males in hoodies driving around a lower income neighborhood.