Switzerland's flag is said to date back to 1339 at the Battle of Laupen, where the Swiss soldiers sewed a white cross onto their uniforms to tell themselves apart from other soldiers. The Swiss did not have their own official flag until 1848. Before that, the members of the country identified themselves by their personal coat of arms.
When Napoleon took command of the country for a time in the late 1700s, he forbade the use of the white cross in any fashion, having the country fly his flag instead. The Swiss flag is one of only two in the world that is square. The other square flag belongs to The Vatican.