William Hartnell played the Doctor from 1963-1966 (3 years). He did return for the 10th Anniversary Special "The Three Doctors" (1972-1973).
Jon Pertwee played the Doctor from 1970-1974 (actually 5 years, as his first Season was recording in 1969). He also returned for "The Five Doctors" (1983), played The Doctor in the stage play The Ultimate Adventure (1989), Dimensions in Time (1993), and did two BBC radio Plays (1993 and 1996).
Tom Baker played the Doctor from 1974-1981 (7 years). He returned for Dimensions in Time (1993). Since 2008 he has been recording Doctor Who Audios, first for AudioGo and presently for Big Finish. He also appeared in the 50th Anniversary Special "The Day of the Doctor" (2013), although as the character the Curator, who may or may not be the Doctor.
Peter Davison played the Doctor from 1982-1984 (actually 3 years as his first season was recording in 1981). He returned for Dimensions in Time (1994). Since 1999 he has been recording audios for Big Finish. He also appeared in "Time Crash" (2007).
Colin Baker played the Doctor from 1984-1986 (2 seasons), He returned for Dimensions in Time (1993). Since 1999 he has been recording audios for Big Finish. He also did the webcast Real Time (2002).
Sylvester Mccoy played the Doctor from 1987-1989 (3 seasons). He was still the "current" Doctor for the first 20+ minutes of "Doctor Who", the 1996 TV movie. Since 1999 he has been recording audios for Big Finish. He also did the webcast Death Comes to Time (2001).
Paul Mcgann played the Doctor in "Doctor Who", the 1996 TV movie. He was the current Doctor until Christopher Eccleston took over. The TV Movie was his only television role as the Doctor during this time however. He read audiobooks for the BBC (such as Earth and Beyond (1998). He has been recording audios for Big Finish since 2000. He did the webcast "Shada" (2003). The New Eighth Doctor Adventure Audios (a collaboration between BBC Radio and Big Finish) started airing on BBC Radio in 2007. He later appeared in "The Night of the Doctor" (2013).
Christopher Eccleston played the Doctor in 2005 (the series was recording in 2004).
David Tennant played the Doctor from 2005-2010 (the last episode airing on 1 January 2010). He also played the Doctor in audios for AudioGo, as well as webcasts like The Infinite Quest and Dreamtime. He returned for "The Day of the Doctor" (2013).
Matt Smith played the Doctor from 2010-2013 (three seasons over four years). He also played the Doctor in audios for AudioGo.
Peter Capaldi played the Doctor from 2014-2017 and left the show in the 2017 Christmas special.
As of yet Jodie Whittaker has only appeared at the end of the 2017 Christmas special, but is the current actor to play the role.