The actual slogan was "Fifty-four Forty or Fight" and the number referred to the north parallel of 54°40′ - the US claim of the lands of the Pacific Northwest. The British (what would later become Canada) claim was at 42°. Basically, it meant that if the US doesn't get its claim, it will fight.
The claims were settled by the Oregon treaty in 1846.