Ten civil war scholars weigh in on the question at history.net. Probably the most frequently cited reason is that the north was simply much bigger in population and industrial capacity, and, over time, inevitably ground the south into submission.
That was a factor, but not the decisive one, in my view. Most battles were more closely matched than is generally thought. The union numbers tended to include all personel within that theater, such as those performing garrison duty in conquered southern cities, for example. The southern numbers were those of actual combatants. On the field, there often wasn't much difference in the size of the two armies.
Around the turn of the 20th century, southern historians began writing revisionist histories of the civil war. They argued, generally, that the south was united in purpose and led by glorious leaders. (Grant, on the other hand, was a bumbler and a drunk.) The south was defending its honor and territory against a rapacious north. It was all about states' rights, they said. (Everyone really knew the south was fighting to preserve slavery. South Carolina said so flat out when she seceded from the union.)
This revisionist history has become the conventional wisdom for many. The truth, however, is otherwise. The south was not all that united in purpose. In fact, one reason the north won is because it was the north that had a clear and identifiable reason for fighting.
From the very beginning, the north understood that it was fighting for the preservation of the union. It was southern sentiment that was more divided. Not that many southerners actually owned slaves, and many were not that enthusiastic about fighting a war that would benefit the oligarchic planters.
Many southerners fought simply because the union army was on the soil of their state. The civil war historian, Shelby Foote, recounts one southern soldier who said he was fighting "because you're here."
That may be an understandable reaction, but it's not a particularly inspiring one, and hardly demonstrates some formidable unity of purpose. (Most every southern state had at least some unionist sentiment. The states of the confederacy supplied about 100,000 troops to the union army.)
After 1863, one may also say that the cause of freeing the slaves added an additional layer of moral ballast and urgency to the northern cause. High purpose was indeed a factor in the war, and most of it was on the union side.
It is also not true that the southern military leadership was superior to that of the north. For one thing, the south had no accomplished leadership in the entire western theater of the war. In the east, Stonewall Jackson had his shining moments, but he also had his "strange to figure" moments as well.
Robert E. Lee was an accomplished battlefield commander, but, frankly, not a very good tactician. Most of his great victories were defensive--this in an era when the defensive had a sizeable battlefield advantage--and on territory that he knew well.
At Gettysburg, if Lee had listened to Longstreet, one of the few strategic thinkers on the confederate side, he might have won the battle by moving his army between Meade and the city of Washington, forcing Meade to attack on ground of his choosing.
As it was, he sent 15,000 troops across an open field, up hill, into the teeth of the union army. Pickett's charge was doomed, and everyone except Lee seemed to know it. The union's defensive position would be formidable even today.
The south didn't lose the civil war so much as the north won it. The north won it through the determination and fortitude of Abraham Lincoln, who gave clear and consistent leadership from beginning to end. George Thomas was the "rock of Chickamauga," but Abraham Lincoln was the rock of the entire north.
Moreover, Lincoln was smart enough to pick Ulysses S. Grant to command the union armies. Grant was a controversial choice. He'd become a general almost by accident, but demonstrated his skills in taking Fort Henry and Fort Donelson, then following that with a brilliant campaign that took Vicksburg from the rear, splitting the confederacy, and giving the union control of the MIssissippi River.
Ulysses S. Grant knew how to beat the confederacy and did. Grant took command of the union armies in March, 1864. One year later, the south capitulated.