People living in Southern states of the USA are mostly habitants of rural area. Their economy depends on farming. They are conservative and therefore support the Republicans, the center-right party.
People living in Northern states of the USA are mostly habitants of urban area. Their economy depends on industry and services. They are liberal and therefore support the Democrats, the center-left party.
But things get complicated when you analyse the "beginning".
The American Civil War was between North and South. Northern states were supporting abolition of slavery, while the Southern states were wanted to keep on with slavery. And the surprising fact is that Northern states were Republican and the Southern states were Democrats!
This is not an easy phonemenon to explain, but with my limited knowledge of constitutional law, I will try:
In the years of the American Civil War, southern states were older settlements with much higher urbanization, thanks to dominating role of agriculture of the time. On the other hand, the northern states were relatively new settlements, where industry was not much advanced and civilization was new. This is why southern states were liberal and therefore supported the democrats, while northern states were conservative and supported the republicans.
When it comes to slavery;
According to the initial constitution, the states were represented in the house in proportion with the number of registered slaves. The total population of the country was not under record at the beginning, but the number of slaves were registered, so it was a ready data.
Northern states were also developing but industry needed workers, not slaves. So the difference in number of slaves between the southern and northern states would not get smaller, but might even get bigger by the time. This is why southern states (though they were the convervative republicans of the time) demanded abolition of slavery and the southern states (though they were urban liberals) insisted on keeping the slavery.
After the civil war, the slavery was abolished. The states were represented in the house in proportion with their population. By the time the northern states became the symbol of urban approaches such as liberalism, while southern states, keeping on their large farms became the symbol of conservative approaches and known supporters of the republicans.