The U.S. Secret Service has two distinct areas of responsibility:
Financial Crimes, covering missions such as prevention and investigation of counterfeiting of U.S. currency and U.S. treasury securities, and investigation of major fraud.
Protection, which entails ensuring the safety of current and former national leaders and their families, such as the President, past presidents, vice presidents, presidential candidates, visiting heads of state, and foreign embassies (per an agreement with the U.S. State Department's Bureau of Diplomatic Security (DS) Office of Foreign Missions (OFM), etc.)
The Secret Service's initial responsibility was to investigate counterfeiting of U.S. currency, which was rampant following the U.S. Civil War. The agency then evolved into the United States' first domestic intelligence and counterintelligence agency. Many of the agency's missions were later taken over by subsequent agencies such as the Federal Bureau of Investigation (FBI), Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF), U.S. Immigration and Customs Enforcement (ICE), and Internal Revenue Service (IRS).