During the War of 1812, the British stormed into Washington DC and burned many buildings in their path. Prior to the war, Britain and France were at odds with the U.S. over the economy and trade. Impressment was going on at that time when the British were taking U.S. soldiers off of their navy ships and kidnapping them so that they would be forced to work for the British military.
The U.S. was angry with this and the war broke out. During the battles, the British soldiers torched the White House. Even though there was notice, Dolley Madison remained in the White House. Her husband, the President, was away at the time. She eventually, left carrying with her the portrait of George Washington among other valuable items so they would not get burned in the house.