The other is an intelligence agency that focuses on foreign collection, analysis and action. Its activities are definitionally illegal in the places where it operates, with the ultimate goal being to inform and enforce American foreign policy using means other than the US justice system.
The CIA sharing information with the FBI generally means that the 4th amendment has been violated, because the CIA operates with an "ends justify the means" framework that the FBI isn't supposed to use.
Edit: I worked with defense/intel forensics as Iraq was transitioning from wartime (intelligence based) to peacetime (justice based) frameworks for dealing with terrorists. There is a massive difference between intelligence briefings needed in a wartime environment to prevent IEDs through "kinetic action" and the evidence packet needed to prosecute terrorists in court as civil society reasserts itself.