Formation of Magnetic Stripes