How did the war in 1812 end?

With a peace treaty between british and american people.