Kennedy served at the height of the Cold War, and the majority of his work as president concerned relations with the Soviet Union and Cuba. A Democrat, Kennedy represented Massachusetts in the U.S. House of Representatives and Senate prior to becoming president. Kennedy was born into a wealthy political family in Brookline, Massachusetts. A Democrat, Kennedy represented Massachusetts in the U.S. House of Representatives and Senate prior to becoming president. Kennedy was born into a wealthy political family in Brookline, Massachusetts. He graduated from Harvard University in 1940, before joining the U.S.