The intake air passes in through the airfilter, from here it travels into the turbo compressor (the alloy part) here the intake air is compressed (to a "boosted level") and pumped into the intercooler. When the air is compressed it gets hot, (not from the hot turbo) but due to when all air is compressed it gets hot. The intercooler (air to air) on the WRX uses cold air from the bonnet scoop passing through the fins to cool the hot inlet air that is passing through the other (inside part) of the intercooler. The inlet air gives off heat to the cooling air. The cold air allows a more dense inlet charge to pass through the throttle body butterfly, (which is connected to the accelerator pedal) then into the inlet manifold, here fuel is squirted in at high pressure from the injectors, where it mixes and passes into the combustion chamber (engine). It goes bang, and heats up, (expands) gives off energy and passes out through the exhaust manifold and into the turbo. As the air expands it drives the turbine wheel (connected to the compressor side wheel via a shaft) this creates the boost. This exhaust gas then passes down and out the exhaust!
The colder the air entering the engine the more HP as its a denser charge with more oxygen and fuel. BUT do not get this mixed up with air temps at the airfilter, as this is only marginal in changes effecting the BIG increases in temps when the air is compressed in the turbo. It is only possible to change the air filter inlet temps by a couple of degrees and this is marginal on effect of performance. The temperature before the intercooler is very high and thus easily reduced as the difference between inside and outside temps of the intercooler are large. (The larger the difference the easier to effect change)
NOTE. Air to water intercoolers (like Liberty / Legacy) are better than air to air, but more costly to make. Obviously water can soak up more heat and transfer it than air!