Original: It operates under the Department of Homeland Security during peacetime, and can be transferred to the Department of the Navy by the President or Congress during a time of war.
Simplified: The Coast Guard can become part of the Department of the Navy during war, but it is not now.