>>513660009
Each state gets a certain number of representatives. The state then draws a map with that number of districts, and each district gets one representative. The districts are required to be drawn in such a way that each one has the same number of people in it. That means districts in cities, with lots of people, are small, and districts in rural areas with not a lot of people are big.
There are ways to draw the map such that one party is over-represented in that district compared to the rest of the state. If you draw a map so that every democrat is in one district, they get one guaranteed rep, but every other rep is republican. Alternatively, you can draw the map a different way so that every district is 51% democrat, so every representative is democrat.
There was a supreme court decision a few months ago saying that states have less regulations on how they draw their maps, so red states are disenfranchising democrats, and blue states already did that anyway so they can't do it much harder (California is trying but they can't do much more than they already do).