The CIA is known to work outside the United States. It is meant to gather information about issues that may affect the country but in a different way. There are some CIAs that may be working as spies in order to gather as many details and information as they can about the plans of other countries against the United States of America. The FBI works within the United States.
They are in charge of trying to solve crimes that have gone cold or crimes that have not been solved by the local detectives yet. They are also in charge of gathering details about some rather high-profile cases that have gotten the attention of a lot of people.