From Wikipedia:
Today, the Secret Service is authorized by law to protect:
The President, the Vice President (or other officer next in the order of succession to the Office of President, should the Vice Presidency be vacant), the President-elect, and the Vice President-elect
The immediate families of the above individuals
Former Presidents and their spouses for their lifetimes except when the spouse divorces or remarries, under the Former Presidents Act. From 1997 until 2013, legislation became effective limiting Secret Service protection to former Presidents and their spouses to a period of 10 years from the date the former President leaves office. President Barack Obama signed legislation reversing this limit and reinstating lifetime protection on January 10, 2013.
The widow or widower of a former President who dies in office or dies within a year of leaving office for a period of one year after the President's death (the Secretary of Homeland Security can extend the protection time)
Children of former Presidents until age 16 or 10 years after the presidency
Former Vice Presidents, their spouses, and their children under 16 years of age, for up to 6 months from the date the former Vice President leaves office (the Secretary of Homeland Security can extend the protection time)
Visiting heads of states or governments and their spouses traveling with them
Other distinguished foreign visitors to the United States and official representatives of the United States performing special missions abroad, as directed by the President
Major presidential and vice presidential candidates
The spouses of major presidential and vice presidential candidates (within 120 days of a general presidential election)
Other individuals as designated per executive order of the President
National Special Security Events, when designated as such by the Secretary of Homeland Security
Any of these individuals may decline Secret Service protection, except the President, the Vice President (or other officer next in the order of succession to the Office of President), the President-elect, and the Vice President–elect.