The department of homeland security prevents terrorism attacks by gather intelligence from surveillance, enhancing immigration laws, enhancing security, and securing and maintaining our borders. When an attack goes off the DHS sends other agencies to go and try to maintain safety to US citizens.
A specific action that the CIA takes to protect our country is to collect data on an issue either covertly or overtly in the field of duty