John Quincy Adams finished in second and became president since he met with the Speaker of the House, Henry Clay and Clay named him President. Many of Jackson's supporters believe that there was a "Corrupt Bargain" where John Quincy Adams made a deal with Clay to make Adams president and Clay will be Secretary of State.
Andrew jackson finished first in the race but didn't become president since the choice was up to the House of Representatives, and John Quincy Adams won. Andrew Jackson grew up poor and orphaned but became a war hero.
Henry Clay finished fourth and was Speaker of the House but according to the 12th amendment the fourth person is elminted. But since he was Speaker of the House he got to decide who won amongst his competitors. Many people think he was part of a "corrupt bargain"