Buchanan was from Pennsylvania, at the time the second most populous state in the country. He came from a relatively well-off family, and was able to attend college, Dickinson. As most future politicians at the time did, he study law after college. He served in Congress, and held many posts for various administrations, most notably as Polk’s Secretary of State.
His presidency was a disaster. Most historians think he was too generous in his treatment of the South, where most of his support came from. He completely botched the slavery issue in Kansas by siding way too heavily with the South. He also was weirdly inactive when the South succeeded, basically doing nothing, claiming the Constitution didn’t allow him to act. Buchanan is often ranked as the worst president in US history (and that’s saying something).