Both are branches of the bureaucracy under the Executive Office of the federal government. The Department of Defense deals with the standing armies that are maintain in the U.S., while the Department of Homeland Security deals more with smaller-scale operations that are intended to combat terrorism.