How did the U.S. gain the territory of Florida?

We settled it with American citizens.

We asked the Spanish to give it to us.

It came with the Louisiana Purchase.

Andrew Jackson attacked and captured Spanish forts, claiming Florida for the U.S. Monroe signed a treaty with the Spanish which gave Florida to the U.S.

President Monroe bullied the Spanish into giving it up after they saw that we were unbeatable.