During the Revolutionary War (1775–1783), Great Britain wanted to impose more taxes on the American colonies, under the claim that the colonists needed to repay the British Crown for protecting them during the French and Indian War. In reality, Britain lost the war and needed more money to repay its debts; thus, they imposed more taxes, and the colonists weren't happy. The unfair taxes and the fact that the colonists lacked good representation in the British government were two of the main reasons why the colonists joined forces in order to gain independence from Britain, which marked the start of the Revolutionary War.
As fighters for independence and liberty, the American colonists were often referred to as "Patriots," as they were against the monarchy and wanted to be free from British influence, both politically and economically. A small percentage of the colonists who remained loyal to the Crown were called "Loyalists."
During the Civil War (1861–1865), the predominantly agricultural Southern states, or the Confederacy, wanted to preserve the institution of slavery, as their economy relied mainly on free labor. In contrast, the predominantly industrial Northern states, or the Union, wanted to abolish slavery and preserve the Union. This clash in interests resulted in the Civil War, which was called "War of the Rebellion" by the Northerners and "War for Southern Independence" by the Southerners.
Thus, the North called the Confederates "Rebels" or "Rebs," as the Confederates were rebelling against the Union. This was especially prominent after the Confederate General P. G. T. Beauregard ordered the attack on Fort Sumter, which Lincoln called "an act of rebellion." The Confederates, on the other hand, called the Northerners "Yankees," or "Yanks."