https://en.wikipedia.org/wiki/Missouri_Compromise
Basically, there were 22 states, 11 that allowed slavery, 11 that didn't, and Missouri wanted to be admitted as a slave state. Only white males could vote (I think they had to be property owners, but I'm not sure), but the number of "representatives" in the lower house of the national legislature was determined by total population.
Compromises were made that black residents in slave states only counted as 3/5ths of a person, so the slave states would have fewer representatives.
Basically, the 11 slave states had almost totally agricultural economies, with most of the work being done by slaves. The northern (non-slave) states had a lot more industry, fishing, etc.