There were three official flags of the Confederacy and there were many battle flags. However, there was one battle flag that became popular and this is the flag that has come to represent the Confederacy since the war.

Some people see the Confederate flag as symbolizing slavery. The Civil War was not just about slavery, but was also about money. The North thought it could not survive financially without the South. Many people in the North owned slaves, and the South was actually in the process of freeing the slaves when the war started. The flag stands for a group of southern states that wanted to be independent, or in other words, Southern pride.
Some people erroneously think the Confederate battle flag is the official flag of the Confederacy. The actual battle flag was a square, and was based on the cross of St. Andrew from the flag of Scotland.
St. Andrew's Cross, or saltier, was a heraldic symbol, (like an "X"), and has been used on many flags over the years. St. Andrew is believed to have been martyred on a cross like this.
On the flag, the cross is blue, with a white border, on a red background. There are three stars on each leg of the cross, and one in the middle. A rectangular version of this flag was the Confederate Navy Jack and is the one mistakenly used to represent the Confederate States of America.
The Confederate States of America lasted from 1861 to 1865, the duration of the Civil War. During this time, the Confederacy was represented by three different flags.
The first flag to represent the Confederacy, called the "Stars and Bars," was designed by Prussian artist Nicola Marschall who also designed the uniforms of the Confederate Army.
It was made up of three horizontal bars, two red and one white, and a blue field in the upper left corner with a circle of stars representing the States of the Confederacy. Since it was similar to the United States flag, with bars replacing the stripes, and the United States flag was called the "Stars and Stripes," it was called the "Stars and Bars." It originally had seven stars, with more being added as states joined the Confederacy, and eventually had 13 stars.
This early Confederate flag stood for the 13 states that wanted to secede from the United States. These states were:
This flag was adopted on March 4, 1861, and raised the next day in Montgomery, Alabama, the capitol of the Confederacy. It flew until the adoption of the second flag in May of 1863.
The second national flag was created because, on the battlefield, the two opposing flags were too similar. General P.G.T. Beauregard wanted the flag of the Confederacy to be completely different to avoid this confusion. The government rejected this suggestion, so he offered the idea of two flags, with one for the battlefield and the other to be the national flag.
The new flag was a field of white incorporating the battle flag that was being widely used at the time. The battle flag was represented in the upper left corner. Most people agree that the white symbolized the purity of their cause.
This flag was nicknamed the "Stainless Banner," because it was mostly white. It was flown from May 26, 1863 to March 4, 1865. Soon it was criticized as having too much white because it soiled easily and looked too much like a flag of truce.
The third national flag was designed by Major Arthur L. Rogers and was adopted on March 4, 1865. Rogers felt that when the flag was limp in the wind, it looked too much like a flag of truce. He suggested a small change to the existing flag by adding a band of red to the right side. He wanted it to have as little Yankee blue as possible, and to pay tribute to the cross of Britain and the red bar from the French flag.
This flag only waved over the Confederacy for eight months as the Confederacy ended on November 6, 1865.