Answer :
The Department of Defense is primarily concerned with engagements overseas and if official wars are ever to fought on domestic territory. The Dept. of Homeland Security deals with potential threats to the country itself, such as terrorist attacks.
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.