What is the difference between the Department of Homeland Security and the Department of Defense?

The Department of Defense Defends the U.S. National Security, and coordinates the different military branches through the Joint Chiefs of Staff .

Homeland Security protects us from terrorism, and coordinates a large number of different programs including the Secret Service, and the U.S. Coast guard.