Quick answer as my ballgame is starting in a moment. Just like MacBaine said. They collect, gather and analyze intel from various sources.
Here is the short Army answer. The Army has 4 standard shops: S/G-1 (Personnel), S/G-2 (Intel), S/G-3 (Operations) S/G-4 (Logistics). There is also an S/G-5 for public affairs. Anyway, at battalion level on up, intel officers provide many services in war and peace. There are also intel battalions, sections and groups.
For example, intel officers are generally in charge of the S-2/G-2 section. In a peacetime administrative environment, they are concerned with physical security, operations security plus subversion and espionage. When deployed, intel looks at threats. During combat ops or even peacekeeping ops, S-2 conducts IPB or Intelligence Preparation of the Battlefield. S-2 assists the commander in making informed decisions.
Where do they acquire this info? Many sources. CIA, NSA, recon, scouts, JSTARS, friendlies, EPWs.
That's it. Gotta go.