The history of multiple candidacies for the Presidency is an interesting one, with five candidates being nominated more than once and losing each time, and five candidates being nominated more than once, and losing before winning the White House (with unusual circumstances for Grover Cleveland)
Those who ran multiple times and continued to lose are:
Charles Pinckney, Presidential Elections of 1804 and 1808
Henry Clay, Presidential Elections of 1824, 1832, and 1844
William Jennings Bryan, Presidential Elections Of 1896, 1900, and 1908
Thomas E. Dewey, Presidential Elections of 1944 and 1948
Adlai Stevenson, Presidential Elections of 1952 and 1956
Those who ran multiple times and first lost, and then won the Presidency are (with unusual case of Grover Cleveland described below):
Thomas Jefferson, Presidential Elections of 1796, 1800 and 1804
Andrew Jackson, Presidential Elections of 1824, 1828 and 1832
William Henry Harrison, Presidential Elections of 1836 and 1840
Grover Cleveland, Presidential Elections of 1884, 1888, and 1892 (winning in 1884, losing in 1888, winning in 1892)
Richard Nixon, Presidential Elections of 1960, 1968 and 1972
Also, Jackson and Cleveland won the popular vote in the elections they lost in the Electoral College, so both actually won the popular vote three times, the only candidates to do that, other than Franklin D. Roosevelt, who won the popular vote and electoral vote four times, in the Presidential Elections of 1932, 1936, 1940, and 1944!
Additionally, Martin Van Buren ran a third time in 1848 on the Free Soil Party line and lost; and Theodore Roosevelt ran a second time in 1912 on the Progressive Party line and lost.